Results 1 to 13 of 13

Thread: [2005] Splitting URL's

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    [2005] Splitting URL's

    Hi all,

    I am having some problems with a url.


    http://localhost:0000/appname/generi...bersandletters


    I only want this part:
    http://localhost:0000/appname/genericloginpage.aspx

    I want to cut off the question mark and everything after it. I've been playing around with the request properties for a little bit and can't find one that gives me only what I need, so I assume there is a different way I have to do it.

    Any thoughts?
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: [2005] Splitting URL's

    wondering if would like to do it this way

    Code:
    dim strURL as string
    strURL = "http://localhost:0000/appname/genericloginpage.aspx?SessionID=numbersandletters".split("?")(0)
    __________________
    Rate the posts that helped you

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    That accomplished exactly what I needed!

    However, it didn't solve the underlying problem.

    I'll just post it here.

    I have a variable called virtualpath that I pass as a parameter to another function in a separate class in order to get my necessary app.config variables (connectionstrings, etc.).

    However, it seems that every time I set the virtualpath variable on a page, the page times out when it tries to postback.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  4. #4
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: [2005] Splitting URL's

    i think anychages made in app.config file will clear all active session as well as reset all application level vairable and hence any new request comes thereafter will be treated as New session.
    __________________
    Rate the posts that helped you

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    I think I understand what you're saying.

    But, I'm not changing anything in the web.config (sorry for saying app.config), I'm just getting the values from there.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  6. #6
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: [2005] Splitting URL's

    can you post the method that is causing timeout as well as Actual error message if any?
    __________________
    Rate the posts that helped you

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    Well I'm at work, so I can't really post the code on here.

    I'm not getting an error message "per se", it's just that whenever I try to navigate on the page, or to another page, I get the generic "Page Cannot be Found" page.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  8. #8
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: [2005] Splitting URL's

    how you are navigating from one page to another?
    __________________
    Rate the posts that helped you

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    Either the back button or a button click.

    I know the problem has something to do with the virtualpath variable, because if I remove it, I can navigate no problem.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  10. #10
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: [2005] Splitting URL's

    well buddy backbutton is never a reliable source to navigate across application pages ,and its really tough to guess without seeing actual code.
    __________________
    Rate the posts that helped you

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    One weird thing I noticed that may be related to my problem.

    Whenever I try to navigate on the defaultdisplay.aspx page, I get the page not found and also the development server (localhost) quits. It's weird because the localhost icon is gone from my taskbar, but Visual Studio still shows my app as running. So obviously, if it's trying to postback to my ip address (which isn't going to have the files), I'm going to get the page not found error.

    I wonder what's causing the browser to look at my ip instead of the address in the toolbar (which still has the localhost address).
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Splitting URL's

    After reading some more, the previous post is not my problem.

    I thought the 127... ip was my actual ip, when it is only the "ip" of localhost. So, forgive my mistake.

    Now I'm really confused. Why would the localhost just "quit"? I assume that's what is happening since the browser can no longer find the ip address.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

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

    Re: [2005] Splitting URL's

    Are you actually using :0000 as a port number?

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