Toon posts:

[asp.net] runtime error bij nieuwe site

Pagina: 1
Acties:

Verwijderd

Topicstarter
Als ik zoek binnen de search blijkt dat meerdere mensen hier last van hebben gehad, alleen een echte oplossing heb ik niet kunnen vinden.

Situatieschets:
1. W2003 geïnstalleerd op een extra machine
2. Nieuwe applicationpool opgezet
3. Nieuwe Website gedefiniëerd en opgenomen binnen de aangemaakte applicatie pool. Door iedereen met een account te benaderen via een speciale host-header name.
4. Een simpel ASP.NET project gemaakt en alle files overgezet op de server.
5. aspnet_regiis.exe -i gedraaid
6. asp.net enabled binnen Web Server Extentions
Wanneer ik echter de site benader krijg ik de veelgenoemde melding:
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>
Ik maak gebruik van de volgende door VS.NET gecreëerde Web.Config file:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    
  <system.web>

    <!--  DYNAMIC DEBUG COMPILATION
          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP.NET files.
    -->
    <compilation defaultLanguage="vb" debug="true" />

    <!--  CUSTOM ERROR MESSAGES
          Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. 
          Add <error> tags for each of the errors you want to handle.

          "On" Always display custom (friendly) messages.
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running 
           on the local Web server. This setting is recommended for security purposes, so 
           that you do not display application detail information to remote clients.
    -->
    <customErrors mode="Off" />

    <!--  AUTHENTICATION 
          This section sets the authentication policies of the application. Possible modes are "Windows", 
          "Forms", "Passport" and "None"

          "None" No authentication is performed. 
          "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to 
           its settings for the application. Anonymous access must be disabled in IIS. 
          "Forms" You provide a custom form (Web page) for users to enter their credentials, and then 
           you authenticate them in your application. A user credential token is stored in a cookie.
          "Passport" Authentication is performed via a centralized authentication service provided
           by Microsoft that offers a single logon and core profile services for member sites.
    -->
    <authentication mode="Windows" /> 


    <!--  AUTHORIZATION 
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous 
          (unauthenticated) users.
    -->
    <authorization>
        <allow users="*" /> <!-- Allow all users -->

            <!--  <allow     users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
                  <deny      users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
            -->
    </authorization>

    <!--  APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application. 
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the 
          application trace log by browsing the "trace.axd" page from your web application
          root. 
    -->
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />


    <!--  SESSION STATE SETTINGS
          By default ASP.NET uses cookies to identify which requests belong to a particular session. 
          If cookies are not available, a session can be tracked by adding a session identifier to the URL. 
          To disable cookies, set sessionState cookieless="true".
    -->
    <sessionState 
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false" 
            timeout="20" 
    />

    <!--  GLOBALIZATION
          This section sets the globalization settings of the application. 
    -->
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
  
  </system.web>

</configuration>
Ik heb echt geen idee meer waar het aan kan liggen... :?

Iemand een verhelderend inzicht?

  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 19:43

GrimaceODespair

eens een tettenman, altijd ...

Heeft de 'Network Service' rechten op je web dirs?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
GrimaceODespair schreef op 15 juli 2004 @ 00:58:
Heeft de 'Network Service' rechten op je web dirs?
hmmm... geen idee. Hier ben ik lichtelijk een n00b, welke 'network service' bedoel je en hoe controleer ik dit?

  • P_de_B
  • Registratie: Juli 2003
  • Niet online
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".
Doe dat nu eens, dan zie je de echte foutmelding.

Hmm, dat heb je? Staat de web.config wel in je root?

[ Voor 14% gewijzigd door P_de_B op 15-07-2004 08:11 ]

Oops! Google Chrome could not find www.rijks%20museum.nl


  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 19:43

GrimaceODespair

eens een tettenman, altijd ...

Verwijderd schreef op 15 juli 2004 @ 07:48:
hmmm... geen idee. Hier ben ik lichtelijk een n00b, welke 'network service' bedoel je en hoe controleer ik dit?
In W2k3 draaien web-processen standaard onder de "Network Service" account. Als je wilt dat IIS aan een site van je kan, moet je zorgen dat de 'Network Service' minstens leesrechten op de betreffende dir heeft.

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
P_de_B schreef op 15 juli 2004 @ 08:10:
[...]


Doe dat nu eens, dan zie je de echte foutmelding.

Hmm, dat heb je? Staat de web.config wel in je root?
yep, gewoon in de root van de aangemaakte website....

  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 19:43

GrimaceODespair

eens een tettenman, altijd ...

Heb je al eens naar de site gekeken vanaf die w2k3 machine zelf?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
ik zit nu niet bij de machine... die staat thuis en /me is op zijn werk.

maar: het is een nieuwe site, geen "virtual directory" -> hoe benader je die op de localhost?

/me voelt zich hierin echt "plain stupid".... 't Is voor het eerst dat ik met een demo-server naast mijn ontwikkelomgeving werk en ik ben geen sys-admin.

  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 19:43

GrimaceODespair

eens een tettenman, altijd ...

Hehe, je weet wel hoe je hem van buitenaf moet benaderen, maar niet lokaal? :) Hoe benader je hem nu dan?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
GrimaceODespair schreef op 15 juli 2004 @ 12:04:
Hehe, je weet wel hoe je hem van buitenaf moet benaderen, maar niet lokaal? :) Hoe benader je hem nu dan?
Ik benader hem net gewoon van buitenaf, via de host-headernaam. Als je een virtual-directory aanmaakt gaat het gewoon via http://localhost/virdiralias. Maar dit is een "nieuwe site", hoe benader je die dan op de lokale machine? Dit gaat niet via http://localhost/websitenaam

  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 19:43

GrimaceODespair

eens een tettenman, altijd ...

Waarom gebruik je dan op die machine ook niet gewoon de host-headernaam?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
fixed: de tips van GrimaceODespair over de rechten voor Netwrok Services hebben me op het juiste spoor gezet. Ik heb gekeken welke rechten welke user heeft op de deafult website en deze ook gezet op de nieuwe site... et voila! alles draait als een zonnetje nu.
Pagina: 1