Answered by:
New to ASP.NET - First Deploy

Question
-
User1909839761 posted
Hi,
I'm new to ASP.NET and have spent the last few months learning it and developing a web site. It is time now to publish that web site and access it from the real world to continue testing. However, when I try to access the site I just get a "500" error. I'm pretty sure it's a configuration or missing file/dll thing but have no idea where to start looking. I'm hoping to get some ideas here.
- I think I started the project as a Web Site and not a Web Application. I do have a "Convert to Web Application" option in the context menu for the site. I also have a .csproj file in the root folder. I think that changes how I publish somehow.
- I am using the Publish option and publishing to a directory on my local drive which I then copy to the IIS server.
- I have all my classes in a "classes" folder which does not appear to get published. However, I do get a "bin" directory which contains a DLL for the site which is smaller than all the files uncompiled. I am assuming that the classes folder and all the code behind files are compiled into that DLL?
- I am using Developer Express components and see that I get no DLL's output for them. Per their instruction I have copied 3 of their DLL's into the "bin" folder. I don't know if I'm supposed to register them or something too?
- Once on the IIS server, I have converted the "bin" folder to an application - I have no idea if this is needed but remember back in my ISAPI.DLL days I had to mark a folder as executable to allow the DLL's to run.
The IIS server is version 8 (point something) and running on Windows Server 2012. I have done no configuration of the server or IIS (I don't think - someone else actually set it up). Is there any thing I need to do with IIS to make it run an ASP.NET site?
Thanks in advance for any advice or direction,
Mike
Wednesday, January 16, 2013 8:54 AM
Answers
-
User1909839761 posted
IIS was not installed with the proper features (ASP and ISAPI). I have added them in and now have an error loading an assembly (for the Dev Express components). I think I have IIS set up right now (or at least functional). Once I have this running I think I'm going to build a server from scratch and document how IIS needs to be configured so I can give that to our tech guys for next time.
Thanks for all your help.
Mike
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, January 16, 2013 2:04 PM
All replies
-
User2034251845 posted
Hi Mike,
Did you try to open the web application in your server?
Try to configure you web.config
with
<system.web>
<customErrors mode="RemoteOnly" />
</system.web>and then see what erro your are having maybe is a code error that you are missing. It should appear as a yellow page with the line information.
Wednesday, January 16, 2013 10:38 AM -
User1909839761 posted
I had tried that and got the same message. I realize now that the tech who set the site up changed some things so localhost was not pointing to this site (at least I think that was what was happening). I made a few changes and now am getting more descriptive messages when running from the server.
I found that there was a problem with my Web.Config and researching it on google showed that I had to make a few changes to the applicationHost.config file (which I did). This allowed me to get past the 500 error and now I am onto a 404 error.
I also found that there was a setting to include ASP.NET 4.5 when installing the IIS role which hadn't been included. I have added it in now but appear to still be getting the 404 error. I'll post more details as I confirm them.
How should the website be configured for an ASP.NET application? Should the entire site be in an application folder?
Thanks,
Mike
Wednesday, January 16, 2013 12:19 PM -
User2034251845 posted
Now that you are in this world you should be familiar with the meaning of the HTML error code here there is nice list explaning it.
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
your 404 is a resource not found so maybe is not a IIS configuration. Check what is that resource that your are not able to find. Like a page. Also check the pool configuration on IIS to see if set in the right way
Wednesday, January 16, 2013 12:32 PM -
User1909839761 posted
IIS was not installed with the proper features (ASP and ISAPI). I have added them in and now have an error loading an assembly (for the Dev Express components). I think I have IIS set up right now (or at least functional). Once I have this running I think I'm going to build a server from scratch and document how IIS needs to be configured so I can give that to our tech guys for next time.
Thanks for all your help.
Mike
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, January 16, 2013 2:04 PM