« Previous Next »

Thread: path problem of IIS 6.0

Last post 05-06-2009 4:35 AM by beatcat99. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 05-05-2009, 6:25 AM

    path problem of IIS 6.0

    Hello guys, 

    I use visual studio 2008 develop my Asp.net web application and publish to the IIS 6.0. Nevertheless, there exists a PATH ERROR.

    For instance, when I ran the web application of the IIS, the A.aspx  should call the http://xxx/B.aspx(relative path). However, it refers to the PHYSICAL PATH of my computer such as c: \test\B.aspx. For this reason, it leads to the null reference exception. Also, it does not happen everytime but randomly.

    ps: IIS 6.0 is installed in the other computer 

     I really apprecaite your response..:)

     

     

  • 05-05-2009, 7:14 AM In reply to

    Re: path problem of IIS 6.0

    Hello,

    It's not very clear what the problem is. Is the file B.aspx exists?

    Regards

  • 05-05-2009, 9:39 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,208
    • IIS MVPs

    Re: path problem of IIS 6.0

    beatcat99:
    the A.aspx  should call the http://xxx/B.aspx(relative path). However, it refers to the PHYSICAL PATH of my computer such as c: \test\B.aspx.

    What does this mean?  How does A.aspx "call" B.aspx?

  • 05-06-2009, 4:35 AM In reply to

    Re: path problem of IIS 6.0

     Hello guys,

    sorry for the previous poor expression.
    I try to clarify this question as clear as possible.

    Be honest, this is really strange problem and it happens RANDOMLY not ALWAYS.
    Therefore, I need you smart guys to help me figure this out.

    -- two computers here, one is development, the other is production
    [development]
    OS               : windows xp
    development tool : visual studio 2008 sp1
    language         : C#
    library          : Net Framework 3.5 sp1
    web server:      : IIS 5.1

    [production]

    OS        : windows server 2003
    library   : net framework 3.5 sp1
    web server: IIS 6.0

    -- suppose two files in my web application, "Progress.apx" and "ApplicationForm.aspx"
    [web application]
    1. /WebApplication/Application/Progress.aspx
    2. /WebApplication/Application/ApplicationForm.aspx

    [problem]

    After i published my web application to the "PRODUCTION" server,
    i ran the "Progress.aspx" and click the link(ps 1) to connect the
    "ApplicationForm.aspx". However, it sometimes, not always, will link to the
    PHYSICAL PATH in my computer(DEVELOPMENT) such as
    "C:\Documents and Settings\bearcat\My Documents\Visual Studio 2008\Projects\WebApplication
    \Application\ApplicationForm.aspx" and causes the "System.NullReferenceException(ps2)"

    Could someone give me some ideas to solve this problem???


    PS 1 : The "progress.aspx" connects the "ApplicationForm.aspx" through
         the click event of "asp:LinkButton" component like below:

         protected void OnApplicationClick(object sender, EventArgs e)
         {
            //CurrentSession.ResetSessionData();
            Response.Redirect("~/Application/ApplicationForm.aspx");
         }
    PS 2:
    [NullReferenceException:    ]
       WebApplication.Application.OnApplicationClick(Object sender, EventArgs e) in C:\Documents and Settings\bearcat\My Documents\Visual Studio 2008\Projects\WebApplication\Application\ApplicationForm.aspx:137
       System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565





Page 1 of 1 (4 items)
Microsoft Communities