Web Hosting Talk







View Full Version : ASP.NET Problem!


speedcom
02-09-2003, 04:55 PM
Hi I'm trying to fix an ASP.NET problem for a website

http://www.slipstreamunderground.com/test.aspx

The file test.aspx contains a simple html code, but when I load the page it gives me the following error,

-------------------------------------------

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>

--------------------------------------------------------------------------


How would I fix this problem so that I can view the webpage?

Thanks a lot, I would appreciate any help.

banner
02-09-2003, 05:00 PM
Well, that error message is just telling you that there is an error, but due to the settings in web.config, it can't tell you what it is. First thing you'll have to do is open up the web.config file and set the mode attribute of the customErrors element to "Off". Then try viewing the page. That should give you a MUCH more descriptive error message. Just remember to set it back the way it was when you're done with development (you don't want Joe Blow to see a stack trace if he finds an error in your page).

Once you have the updated error message, post back here and I'll try to take a look at it.

speedcom
02-09-2003, 05:27 PM
Thanks for The quick reply banner, I have one lingering problem however, where is the web.config page located? I've searched numerous folders and files but am unable to find it.

Thanks a lot!

RackMy.com
02-09-2003, 06:03 PM
Try and browse the site locally, that should give you a better error message.

The web.config file should be in your site's root directory.

banner
02-09-2003, 06:08 PM
Oh, and if your site doesn't have a web.config (ie you just created the test.aspx file in notepad or something), then just create one and copy and paste this into it:
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Then place the file in the directory containing test.aspx. This will accomplish the same thing that I mentioned above.

ADEhost
02-09-2003, 06:11 PM
what's the hosting platform? sometimes in h-sphere you can not get to it ( because it sits with the host )

speedcom
02-09-2003, 06:19 PM
The Hosting platform is Windows 2k - using Hosting Controller. If I make a file named web.config, is that how it should be spelled?

Would it not be like web.config.aspx? or web.conf?

Thanks.

sunpost
02-09-2003, 06:39 PM
web.config is the file name.

Layout of ASP.NET Web Applications (http://www.microsoft.com/technet/prodtechnol/windowsnetserver/proddocs/server/aaconfilesystemlayoutofaspnetwebapplications.asp)

ADEhost
02-09-2003, 07:08 PM
Originally posted by speedcom
The Hosting platform is Windows 2k - using Hosting Controller.

Thanks.

UUHHGG the evilist platform around, I truely disike that platform for security reason and the way it just feels uuuwwwweee...

Mike

speedcom
02-10-2003, 05:29 PM
How would a create a file with that ending on it (.config)?

banner
02-10-2003, 05:32 PM
Just use notepad and when you say save type in "web.config". That should do it.

speedcom
02-10-2003, 08:40 PM
After doing *exactly* what you told me to do banner it didn't seem to work to my disadvantage :(. Here is the same link http://www.slipstreamunderground.com/test.aspx and I get the same error!

Any more help here?

Thanks.

ADEhost
02-10-2003, 08:56 PM
speedcom, do you have root access ?

banner
02-10-2003, 09:37 PM
Would it be possible to post your files here (IE there's nothing secret or any special database connections)? If so, I may be able to take a look at them on my machine and see what's going on. Assuming you put the web.config file in the v-root of the site, it should work.

Oh, and one other thing that I just thought of, make sure that you have created an "Application" in IIS manager for this site. Sometimes if this isn't done, ASP.NET can have problems as well.

Melee
03-02-2003, 03:00 PM
remove the semi-colon