I made a very simple web application from the web application template. Then I added a web api controller, added global.asax and an entity framework based database. When running in VS2012, everything works fine. The web api returns the expected requested stuff from the database. So far so good. Now I want to deploy this to an productive machine using web deploy 3.5. So I do Publish/Create web deploy package/etc. Then copy the package to a production machine and do .cmd /y and all installs fine. But when I try to browse the site I first I receive and error that tells me that there is a duplicate 'entityframework' section in my web.config (well, there's NOT), but OK, I renamed some stuff to get it to work, but now my web api url does not respond =(
Sigh, are there any recommendations how to use this web deploy thing or how can I just make sure that what I created in VS2012 and works on IISExpress, to port it to another web server?
This is really driving me nuts and I spent a lot of time on this.
Anyone please???
BR,
Ronald
Ronald please take a look here,maybe it might help you.
http://msdn.microsoft.com/en-us/library/dd394698(VS.100).aspx
Related
I am trying to deploy the solution to IIS but it does not work.
I have the following structure in my solution:
Web ASP.NET MVC project
Web API project
Web API project (authentication related)
In the IIS, I created the following structure:
C:\inetpub\wwwroot\prj\site
C:\inetpub\wwwroot\prj\api
C:\inetpub\wwwroot\prj\auth
IIS has only 1 Web Site, pointing to C:\inetpub\wwwroot\prj\site
That's it. Nothing else.
When I go to localhost/login it displays me the proper page but for some reason authentication does not work, I presume this is because there is something wrong with the settings
All that works fine when I run the project using VS (Internal IIS), just clicking "run"
Please advise what to check and what to change? Thanks
I have built my first ASP.NET web API in MVC, when I debug the application from Visual Studio everything works perfectly.
Now I need to get these API's on my server...
I have tried copying the project files to the website root which usually works for normal MVC apps with views, and I have also built the project and copies the file full of DLL's and an exe to the IIS root.
Obviously, neither of these worked, anyone know what I am missing? Perhaps something I have to do with IIS?
I have now tried "publishing" the project and when I try to access the site this happens...
Thanks in advance!
Build the application then publish it. Copy the published files to a favorite IIS folder. Ensure you select the right version of ASP.NET in the server for your application in the application pool.
When you publish and get an error such as this it is often related to a configuration issue, or other non-supported .NET Runtime issue.
For best results, if you can get to the Event Viewer for the server a detailed error should appear there outlining the root cause of the issue.
If you don't have access to the server directly, updating the <system.webServer> section with the below should get you a detailed error.
<httpErrors errorMode="Detailed" />
Just please note DO NOT LEAVE THAT LINE IN PRODUCTION!
I've recently been working with ASP.NET again and decided to create a small ASP.NET project in a subfolder on one of my websites. I'm using Visual Studio 2013 and created the project using the ASP.NET Web Forms Application template. After creating the project, I left everything at the default, verified that it would build locally, published it to a folder on my system and then copied the published files via FTP to the subfolder on my site. When I tried to bring it up in my browser, it failed with the code ERR_CONNECTION_RESET. This told me that the host was seeing something there, otherwise it would have gone to my site's main 404 page. Chrome also refused to load the other pages within the deployed template. I did set the folder as an application in IIS after getting another error about forms authentication but that didn't have any effect.
I was able to successfully re-deploy an old ASP.NET site created with .NET 4.0 in VS2010. I was also able to deploy and load a project created in VS2013 / ASP.NET 4.5.1 with the ASP.NET Empty Web Application template.
I finally finally get the Web Forms template to work by doing the following -
Created a basic Default.aspx page with no master page.
Created a basic web.config file (copied from another new empty
project)
Commented out the following lines in the Application_Start function of Global.asax
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterOpenAuth();
RouteConfig.RegisterRoutes(RouteTable.Routes);
At that point, the project ran on the host with no problem. I then restored the Default.aspx and Web.config files and the project again failed, even with the Global.asax lines still commented.
I also changed the SessionState mode to "Custom" as suggested in the web.config file and this made no difference.
My question at this point is this - Has anyone else deployed a .NET 4.5.1 Web Forms app designed from the VS2013 template to a shared hosting service and is there something that you have to do to get it to work?
I'm fairly satisfied at this point that I can use the empty web application template and build things from scratch but I'd like to know if anyone else has run into this and what they did.
Thanks.
ERR_CONNECTION_RESET sounds to me like you were having some kind of Internet connectivity troubles, or your server was having some sort of Internet connectivity trouble. If it's working fine now, probably nothing to worry about.
Has anyone else deployed a .NET 4.5.1 Web Forms app designed from the VS2013 template to a shared hosting service and is there something that you have to do to get it to work? Yes, lots of people have done that.
I'm using the automated help files and when I build and debug locally they work fine.
When I do a publish to a remote IIS server, instead of the working full api documentation, I get this:
Introduction
Provide a general description of your APIs here.
GETPOSTPOSTPOSTDELETEGETGETPOSTGETGETGETGETGETPOSTDELETEPOSTDELETEGETGETPOSTDELETEGETGETGETPOSTGETGETGETGETGETGETPOSTDELETEGETGET
When I started the project, the remote deployed help files worked fine, and I have no idea how they broke. Any tips on where to look would be really appreciated.
Note: The rest of the webservice works exactly the same, all of the api calls work locally and deployed. it's only the help that is broken.
Question: I created an ASP.NET web application.
Now it originally was meant for deployment on a webserver.
That is working, so, so far so good.
My question now is: Is it possible to deploy it as a desktop-application, too?
That is to say the installer installs some kind of server, plus the web application, configures the server to run this application on a localhost URL, and then creates a link in the start menu/desktop, where it opens that url (website, the application) on localhost in a web browser?
I think it should be possible, though the server wouldn't be IIS, because this is a windows component which can't be separately installed.
Is there anything like this already out there ?
The nonplusultra would be that it only starts the server when you click on the shortcut.
I'm not sure, but you could use IIS express, when it will be released. Take a look to ScottGu's post Introducing IIS Express.
I almost went for Cassini.
But in the meantime, I found something better:
http://code.google.com/p/aspnetserve/
My mistake was searching for 'asp.net deployment server component' instead of 'asp.net embedded webserver'.
A really cool project.
Seems to work, at least for my needs.
Edit:
A much better choice is xsp4 from package xsp-2.10.2, courtesy of the mono-project.
http://download.mono-project.com/sources/xsp/
Works on both Linux and Windows, as well as Mac, with both mono and .NET framework, and that without GAC installation (in fact, without any installation).
The latest source is here:
https://github.com/mono/xsp/tree/master/src
You can use an easily installable ASP.Net webserver such as UltiDev Cassini.
I think what you are looking for is something like Adobe Air: http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime
However you want to be able to run ASP.NET, which Adobe Air does not. My suggestion is to use Silverlight