Results 1 to 19 of 19

Thread: Error running ASPX test page

  1. #1

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Error running ASPX test page

    I have site that I did in Classic ASP 5 years ago, the owner now wants to make some changes to the code. I decided to see if moving to .net was an option since the server claims to support .net.
    I created a default project and created a page called WebForm1.aspx
    I dragged a button to my form and in the button click put a response.write "hello"
    Simple enough....
    I ftp'd the bin dir with the .dll file as well as the Webform1.aspx page to the server.

    I get the following error. Yet I uploaded the same files to 2 other different hosting company servers that belong to other clients and everything works as intended.
    They called me back and said there was a problem with my code (typical host response) and the codebehind was pointing to a file that doesn't exist.
    How is it that it works elsewhere but not on their server?
    What steps can I do to troubleshoot on my end more or should I just wait to see what they find?

    VB Code:
    1. Server Error in '/' Application.
    2. --------------------------------------------------------------------------------
    3.  
    4. Runtime Error
    5. 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.
    6.  
    7. 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".
    8.  
    9.  
    10. <!-- Web.Config Configuration File -->
    11.  
    12. <configuration>
    13.     <system.web>
    14.         <customErrors mode="Off"/>
    15.     </system.web>
    16. </configuration>
    17.  
    18.  
    19. 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.
    20.  
    21.  
    22. <!-- Web.Config Configuration File -->
    23.  
    24. <configuration>
    25.     <system.web>
    26.         <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    27.     </system.web>
    28. </configuration>
    Truly, you have a dizzying intellect.

  2. #2
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Red face Re: Error running ASPX test page

    Sound like it’s the web.config file to blame, Try this code in your web.config file:

    Code:
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>
    Simply copy that to notepad and safe the file as "web.config" and the set the file save as type to "all" and not txt. Then once uploaded to the same location as the web page should fix things for you

    Hope that helps

    I will wait for death with a smile and a big stick

  3. #3

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    Doesn't help...still get the same error.
    I think that unless I'm actually on the local machine to see the actual error the most I can do is a redirect to a custom error page.


    VB Code:
    1. Server Error in '/' Application.
    2. --------------------------------------------------------------------------------
    3.  
    4. Runtime Error
    5. 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.
    6.  
    7. 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".
    8.  
    9.  
    10. <!-- Web.Config Configuration File -->
    11.  
    12. <configuration>
    13.     <system.web>
    14.         <customErrors mode="Off"/>
    15.     </system.web>
    16. </configuration>
    17.  
    18.  
    19. 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.
    20.  
    21.  
    22. <!-- Web.Config Configuration File -->
    23.  
    24. <configuration>
    25.     <system.web>
    26.         <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    27.     </system.web>
    28. </configuration>
    Truly, you have a dizzying intellect.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Error running ASPX test page

    Can you post the contents of the web.config file you're uploading?

  5. #5

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    Here you go!
    VB Code:
    1. <?xml version="1.0" encoding="utf-8" ?>
    2. <configuration>
    3.    
    4.   <system.web>
    5.  
    6.     <!--  DYNAMIC DEBUG COMPILATION
    7.           Set compilation debug="true" to insert debugging symbols (.pdb information)
    8.           into the compiled page. Because this creates a larger file that executes
    9.           more slowly, you should set this value to true only when debugging and to
    10.           false at all other times. For more information, refer to the documentation about
    11.           debugging ASP.NET files.
    12.     -->
    13.     <compilation defaultLanguage="vb" debug="true" />
    14.  
    15.     <!--  CUSTOM ERROR MESSAGES
    16.           Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
    17.           Add <error> tags for each of the errors you want to handle.
    18.  
    19.           "On" Always display custom (friendly) messages.
    20.           "Off" Always display detailed ASP.NET error information.
    21.           "RemoteOnly" Display custom (friendly) messages only to users not running
    22.            on the local Web server. This setting is recommended for security purposes, so
    23.            that you do not display application detail information to remote clients.
    24.     -->
    25.     <customErrors mode="RemoteOnly" defaultRedirect="whatwedo.htm" />
    26.  
    27.     <!--  AUTHENTICATION
    28.           This section sets the authentication policies of the application. Possible modes are "Windows",
    29.           "Forms", "Passport" and "None"
    30.  
    31.           "None" No authentication is performed.
    32.           "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
    33.            its settings for the application. Anonymous access must be disabled in IIS.
    34.           "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
    35.            you authenticate them in your application. A user credential token is stored in a cookie.
    36.           "Passport" Authentication is performed via a centralized authentication service provided
    37.            by Microsoft that offers a single logon and core profile services for member sites.
    38.     -->
    39.     <authentication mode="Windows" />
    40.  
    41.  
    42.     <!--  AUTHORIZATION
    43.           This section sets the authorization policies of the application. You can allow or deny access
    44.           to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
    45.           (unauthenticated) users.
    46.     -->
    47.     <authorization>
    48.         <allow users="*" /> <!-- Allow all users -->
    49.  
    50.             <!--  <allow     users="[comma separated list of users]"
    51.                              roles="[comma separated list of roles]"/>
    52.                   <deny      users="[comma separated list of users]"
    53.                              roles="[comma separated list of roles]"/>
    54.             -->
    55.     </authorization>
    56.  
    57.     <!--  APPLICATION-LEVEL TRACE LOGGING
    58.           Application-level tracing enables trace log output for every page within an application.
    59.           Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
    60.           trace information will be displayed at the bottom of each page.  Otherwise, you can view the
    61.           application trace log by browsing the "trace.axd" page from your web application
    62.           root.
    63.     -->
    64.     <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    65.  
    66.  
    67.     <!--  SESSION STATE SETTINGS
    68.           By default ASP.NET uses cookies to identify which requests belong to a particular session.
    69.           If cookies are not available, a session can be tracked by adding a session identifier to the URL.
    70.           To disable cookies, set sessionState cookieless="true".
    71.     -->
    72.     <sessionState
    73.             mode="InProc"
    74.             stateConnectionString="tcpip=127.0.0.1:42424"
    75.             sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    76.             cookieless="false"
    77.             timeout="20"
    78.     />
    79.  
    80.     <!--  GLOBALIZATION
    81.           This section sets the globalization settings of the application.
    82.     -->
    83.     <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
    84.    
    85.   </system.web>
    86.  
    87. </configuration>
    Truly, you have a dizzying intellect.

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    did you create an APPLICATION on the webserver for the folder that the aspx page is sitting in?

  7. #7
    Addicted Member rabid lemming's Avatar
    Join Date
    Feb 2005
    Posts
    210

    Question Re: Error running ASPX test page

    Not sure if this is right but might be worth a try:

    in you asp page use:

    <%@ Page Language="VB" Debug="true" %>

    You may want to contact your web host and ask then if their is any reason for such a problem

    I will wait for death with a smile and a big stick

  8. #8

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    no go... thx,
    the hosting company is supposedly on it, I just wanted to see if perhaps there was something on my end-although it works fine on the other hosting company servers it seems like it is thier problem.
    Truly, you have a dizzying intellect.

  9. #9
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    again, did you create an application on IIS for the directory you FTP'd the files to? If you didn't that could cause your problem.

  10. #10

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    I don't have access to the hosting server-I have ftp access only.
    Unless they have a control panel for users, I don't follow what you mean by creating an application on IIS
    Truly, you have a dizzying intellect.

  11. #11
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    ASP.NET applications need to have an application created for them on IIS to run correctly...

    If you don't have access to IIS on the server (which is usually the case with 3rd party hosts) then they generally offer a control panel where you can create/remove applications.

    Here is what the IIS panel looks like. You should check and see in the control panel of the site if there is an option to do this.. its probably the problem. Most (if not all) hosts that offer ASP.NET, give you that functionality.

    Don't you have IIS on your development machine?
    Attached Images Attached Images  

  12. #12

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    Of course I do-Any I've never had to do what your suggesting in order to make my pages work either on my local machine or or a 3rd party server.
    But I'll call them and see.
    Truly, you have a dizzying intellect.

  13. #13
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    well when you create a new asp.net application in visual studio.. it does it for you... thats that whole dialog you get while its "creating the web application" or whatever it tells you when you create a new ASP.NET application

  14. #14
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Error running ASPX test page

    Yes, but he doesn't have access to the host server. Which means you must create an application folder through a control panel that they provide which will create the IIS application folder for you. You cannot simply create a new ftp folder and put the files in there. Get it (get it? ha ha)?

  15. #15
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    I know... I was just posting an IIS screen shot because posting a screenshot of my webhosts control panel wouldn't really help any

    but I did mention above
    If you don't have access to IIS on the server (which is usually the case with 3rd party hosts) then they generally offer a control panel where you can create/remove applications.

    Here is what the IIS panel looks like. You should check and see in the control panel of the site if there is an option to do this.. its probably the problem. Most (if not all) hosts that offer ASP.NET, give you that functionality.

  16. #16

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    I guess one point of confusion is I have two other hosting companies I use and all I did was ftp the files up and they worked no problem.
    So apparently something is different in the way these companies have set up their servers.
    Truly, you have a dizzying intellect.

  17. #17
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    did you upload them right to the root of the site? or did you create folders for the individual tests you were doing?

    Perhaps the other hosts have something in place to create an application for all folders?

  18. #18

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Error running ASPX test page

    I uploaded the bin directory with the dll and the aspx page to the root.
    Truly, you have a dizzying intellect.

  19. #19
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Error running ASPX test page

    The root has an application on it by default (I think) If I am wrong then perhaps the host does it for you on the root.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width