Last post Mar 23, 2013 02:06 AM by technologixs_ManishKumar
Jul 14, 2011 10:51 PM|MWRivera|LINK
I'm trying to setup a Web application in IIS 7. At the moment we have a WebSite setup
www.ABC.com. Within this WebSite we want to setup another application, for example "app1" so that it can be accessed using the URL
www.ABC.com/app1. The WebSite is setup and running fine. The problem is when it comes to setting up the sub application, which I setup as a Virtual Directory. When I browse to the application the error message "500 - Internal
server error.There is a problem with the resource you are looking for, and it cannot be displayed" is displayed. I'm sure I carried out the correct steps though because I created a basic aspx file as a test, set that us as a VD and was able to view it in the
browser through, www.ABC.com/Test.
What could be causing the 500 error to be shown?
Any help on this would be really appreciated.
Jul 14, 2011 11:44 PM|necro_mancer|LINK
You may need to look at your server log to find out about the actual error message of "HTTP 500 Internal Server". This error message can mean anything, ranging from incorrect virtual directory permission, wrong path, components are not installed properly, anything.
The forum users here will not be able to help you if you do not provide the details of this "HTTP 500 Internal Server Error" message. I look forward to your update!
Jul 14, 2011 11:46 PM|kctt|LINK
Hosting asp.net application in subfolder on IIS 7 requires virtual application. Virtual directory does not work.
You need to enable error details of 500 - Internal server error to troubleshoot.
Jul 15, 2011 07:47 AM|MWRivera|LINK
Hi, Thank you for your reply.
Could you provide me with instructions on how to look at the server log?
Jul 15, 2011 08:21 AM|MWRivera|LINK
I found a log entry refering to ASP.NET, please see the details below:
Event code: 3006
Event message: A parser error has occurred.
Event time: 7/13/2011 4:26:00 PM
Event time (UTC): 7/13/2011 8:26:00 PM
Event ID: b25efca1e9f844ac8f9f9cb99e07d0c1
Event sequence: 28
Event occurrence: 2
Event detail code: 0
Application domain: /LM/W3SVC/2/ROOT-1-129550593341840158
Trust level: Full
Application Virtual Path: /
Application Path: C:\WebSite\
Machine name: 293735-VM2
Process ID: 4300
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception type: HttpParseException
Exception message: Could not load the assembly 'App_Web_qxgtcr-t'. Make sure that it is compiled before accessing the page.
Request URL: http://www.***.com/Web***/default.aspx
Request path: /Web***/default.aspx
User host address: 18.104.22.168
Is authenticated: False
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread ID: 5
Is impersonating: False
Stack trace: at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The App_Web_qxgtcr-t.dll file is present in the bin folder.
Jul 15, 2011 01:57 PM|MWRivera|LINK
Any idea why the exception "Exception message: Could not load the assembly 'App_Web_qxgtcr-t'. Make sure that it is compiled before accessing the page." is being thrown?
Jul 15, 2011 09:15 PM|necro_mancer|LINK
It is now clear that you did not properly compile and publish your project to the remote server. Please follow the guidelines below:
1. Please open your Visual Studio tool and please open your project
2. On the top right hand of the VS tool, you will see Solution Explorer Window.
3. Right click your project and then, select "publish"
4. Please choose one of the published folder (e.g. C:\WebSite) and publish all your files there
5. Once this is done, you will see a set of files on C:\Website folder, however, you will not see any code-behind (.cs or .vb) files anymore.
6. Please make sure you upload ALL your files you see on this C:\WebSite folder to the server and everything will be working fine.
Should you still experience problems, you should contact your host provider directly. I would recommend you to go with asphostcentral.com as this host specialises in asp.net windows hosting. They can certainly help you out with any kind of windows hosting problems.
Please mark this response as an "answer" if it helps you. Thanks heaps!
Jul 18, 2011 11:40 AM|MWRivera|LINK
I followed the steps you provided above selecting "Publish Web Site" at step 3, but was still unable to get the application to display i nthe browser.
I saved the published files in the following folder --> C:\...\WebSite\PrecompiledWeb\WebSite08 I then uploaded this folder to the server and set it up as a Virtual Directory from the WebSite folder, that did work so I tried setting it up to point to
the PrecompiledWeb and WebSite08 folder but none of these worked. I also tried setting it up as an Application, but still had no luck.
When setting the WebSite up as a VD I recieve the following results:
I believe I should be pointing at the WebSite08 folder which holds all the compiled code files.
Any idea what the problem is?
Jul 18, 2011 11:50 PM|necro_mancer|LINK
May I please know how do you host this site? Do you go with any shared host provider OR do you run your own server?
Mar 23, 2013 02:06 AM|technologixs_ManishKumar|LINK
finally solved this 500 Internal server error when deploying MVC 3.0 application on godaddy.ocm shared hosting
somehow there were discrepancies on the version of DLLs referenced and version mentioned in web.config.
Tried all the options mentioned in various forum, Nothing helped, although everyone suggested same kind of fix, but somehow didnt work in my scenario. finally after banging my head for 2 days.
i decided to deleted all dll reference and delete web.cofig( make a local copy) from project and let application throw error and then add dll one by one making copy to local=true.
after all the dlls are added. i created a new asp.net mvc application and copied the web.config of new app to my actual app.
so my actual app now has a new web.config, then i copied the connectionstring and other reference from the local copy of web.config that i saved .
just compiled the application and published to local folder
and FTP the published folder to goDaddy
It worked and finally my problem was solved
Hope this will help people and they dont waste 2 days like me,