web.config error! please help!

  • Thread starter Thread starter n3crius
  • Start date Start date
N

n3crius

hi,

i just got a web host with asp.net , seemed really cool. aspx with the
c# or vb IN the actual main page run fine, but when i use codebehind and
make another source file ( a .cs) to go with the aspx (as you would
realistically) I get this :

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".

----- every damn time, and ive done what it says about the web.config,
ive tried everything. i get nothing back from the tech support at the
minute so im totally in the dark :( . any suggestions please?

thanks
 
Rasika said:
Make sure you web.config looks something like this:

<?xml version="1.0" encoding="utf-8" ?><configuration><system.web><compilation debug="true" /><customErrors mode="Off" /></system.web></configuration>

mode="Off" should only be used for debugging purposes. Change it back to "On" after you finish so that everyone doesnt see your code during an exception and stack trace.

yeah all looks corect, i even replaced with youts

take a look http://www.necrius.net/WebApplication1/WebForm1.aspx
 
Hi

I think the error could be that you have not configured an IIS application
at the
WebApplication1 folder.

Currently it is now taking the root application. Unless you configure an
application in IIS for the folder WebApplication1, your web.config (which is
under the WebApplication1 folder) will not take effect.

let me know if this helps..

-Raj

"On" after you finish so that everyone doesnt see your code during an
exception and stack trace.
 
How can I alter the IIS? This is a web host I'm using, I can't fiddle
with their IIS! ;)


CK
 
Some webhosting provider will provide you a "control panel" to configure
these.

In case you dont have such a facility, the best bet you could do is to
configure the web.config at the root of the site .

Just copy the web.config to root and try....

HTH

Raj
 
hey thanks mate,

i put the config in a number of palces, and now it works! but...

after fixing a few things inthe config, i get this :

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse
error details and modify your source file appropriately.

Parser Error Message: Could not load type 'WebApplication2.WebForm1'.

Source Error:


Line 1: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="WebApplication2.WebForm1" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3:


Source File:
D:\Webspace\necrius.net\wwwroot\WebApplication2\WebForm1.aspx Line: 1
 
thanks for your dambass response, i'm a .net developer for a large
company in the uk, and i do my job very well. just because i've not
done this through a different host before doesn't mean i 'lack the
knowledge to develop in asp.net', nazi boy!
 
Back
Top