WebApi 2.2 Automatic Help files broken when deployed to IIS - c#

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.

Related

Installing an ASP.NET web API on IIS

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!

Error 500.21 after deploying ASP.NET Core app locally to IIS

I seem to be having noob level errors here Publishing an ASP.NET app locally.
The site is:
Published to an ApplicationPool with No Managed Code per suggestions here
Is literally just the template code app from Microsoft specified in this article - no extra stuff.
I'm just trying to test settings here on my local machine before seeing how it works on another machine but perhaps I'm missing something? Everything I've read I can on the subject and simply can't seem to get this going - any step-by-step walkthroughs about doing this?
In my case, the answer was staring me right in the face - I was missing the AspNETCore Module. I thought I had it when enabling everything else with IIS but apparently, I didn't.

Upload ASP.NET Web API

I've finally come to publish one of my hobby projects, but the visual studio publish through FTP will not work, FileZilla on the other hand will.
Which left me with the question.. what do i upload?
The whole thing? thats what i tried first, uploading all to the root folder of my webhotel, and all i get is:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Detailed Error Information
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler HS-StaticFile
Error Code 0x00000000
Requested URL http://d32023759.u207.surf-town.net:80/
Physical Path D:\hshome\hb944222072\domain.dk
Logon Method Anonymous
Logon User Anonymous
Things that could have an effect:
The domain is not transfered yet, so i have a temp url?
(only time or stackoverflow will tell me)
The project is 4.5.1 .net and the Server version is 4.0?
(I cant imagine that throwing this error)
The configuration of the website?
For simplicity i have tried uploading a fresh Visual Studio ASP.NET 4.5.1 SPA with Web API template.
Which i hoped was configured to work out of the box.
And i really feel i've hit a wall googling for any guides or info while googling, so any help, pointers, hints or links to resources are very welcome.
In my Webhotel management, i had an option to set the ASP.NET Version and its Pipelinemode
Pipeline Modes:
Classic For instructions on enabling IIS6 or IIS7 classic mode
Integrated include the System.Web.Mvc assembly and everything just works
Copied from comment on this question, Thanks to Jon Erickson

web deploy c# web application with web api's

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

How to deploy a C#, MVC4 application on Azure using Git

I am developing a C#, MVC4, EF5 Code First application on .NET in Visual Studio 2012 and have used the VS publish mechanism to deploy it to an Azure Website with an Azure SQL Database.
I now want to use Git and GitHub for version control and involve others in the project.
However, although I am familiar with using Git in a LAMP environment, I have no experience of using Git with Windows, Azure Websites and a compiled environment.
I would like to use the Azure Website as the production server, another Azure Website as a Staging server, developer Windows machines using Visual Studio for development and GitHub as the central repository.
There is a helpful article here: http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/ . I can get my head around what would be needed here for, say, a PHP application on Azure. But I am unsure of the best approach with a compiled application and what I can achieve using Azure Websites and Visual Studio.
A nudge or two in the right direction would be greatly appreciated!
don't publish from VS to azure, instead setup your azure website to pull from the github repo. the deployment process compiles your solution.
watch http://www.youtube.com/watch?v=5NGieL0tinw&feature=youtu.be&hd=1 or read http://vishaljoshi.blogspot.com/2012/09/continuous-deployment-from-github-to.html
Also SocttGu announced this on his blog # http://weblogs.asp.net/scottgu/archive/2012/09/17/announcing-great-improvements-to-windows-azure-web-sites.aspx he also talks about a cool feature of publishing branches, this will nail your requirement for a stage server and production server. Have a stage branch and a production branch and merge to them as desired. see the section "Support for multiple branches"
looks like they added support for private repos finally.
appharbor is a competitor to azure that does something similar.
You are basically introducing a new step with the requirement that the source code must be compiled before it can be deployed to the server. Where you implement this step is up to you. You could:
Ensure that your target server has the capabilities to compile the source code (some Continuous Integration tools could help with this, such as CruiseControl.NET). This has the caveat that the target server be able to compile source code (possibly even requiring Visual Studio to be installed), so that may not be an option.
Check the compiled binaries into source control. You could keep these compiled binaries separate from the main source branch, to keep things clean. Deploy the binaries to the target server.
Some hybrid of the previous two options is also possible; you could set up a Continuous Integration server with CruiseControl.NET, which can check out the current source, build it, and check the resulting binary back into a special branch, then deploy that branch to your target Server.

Categories

Resources