Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is it that a simple .NET program newly published will not run?

Status
Not open for further replies.

xarzu

IS-IT--Management
Jan 16, 2012
19
US
Why is it that a simple .NET program newly published will not run?

I made a very simple .NET program from scratch with very little modifications. I removed some of the stuff that were put in the .aspx file without my approval and part of the process of creating an app with the wizard when you select to create a new .NET app. I removed a lot of default content in the default.aspx file. Then I added some texbox fields and some code supporting to the default.aspx.cs file.

But I have to stress that it was not a complex program. It was a very minimalist "hello world" type program.

I published the code to a server and then opened a browser window to view the program.

To my surprise, it threw a Runtime error. So my question is this. Why would a brand new, almost bare program in .NET throw a runtime error when published? I published it in Release mode. Shouldn't Visual Studio be smart enough and well designed enough to allow a minimalist program to be successfully published?


It says this:

web app said:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

My point is that I should not have to alter the web.config to see something that was produced right off the visual studio wizard.
 
My point is that I should not have to alter the web.config to see something that was produced right off the visual studio wizard

You said you made modifications. Even if minor, as you stated, can cause a problem. So it seems whatever you did is causing an error. Why not run it locally to see what the error is?

Also, you have to make sure that your web server is setup correctly. You should debug locally first, before deploying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top