locked
ASP.net c#, Variable Scope for Web site in SubFolder RRS feed

  • Question

  • User1045460610 posted

    I have a web site project CheckIn I want to integrate with an asp.net web site project Courses. I want to be able to pass variables from the web site application Courses to the web site CheckIn. The CheckIn web site works on my asp test server and runs in IIS Express from browse with in Visual Studio, but has some compatibility errors running from IIS on the server. Checkin has a web.config with database connections and other web settings. If I copy my CheckIn web site to a subfolder on Courses does it need to be added in IIS as a virtual folder? I want to pass a variable AccountNo to CheckIn. If CheckIn is added as another web site in IIS as a virtual folder are the application variables like AccountNumber in Courses going to be in scope for the subfolder CheckIn?

    Tuesday, September 10, 2019 4:07 PM

Answers

  • User2053451246 posted

    Web applications can't talk to each other like that.  The internet works using post/gets and returned results.  You would pass a variable to the other application by using the query string in the URL, or a posted form collection method you determine.

    ....aspx?VariableFromApp1Name=Value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 10, 2019 7:27 PM

All replies

  • User2053451246 posted

    Web applications can't talk to each other like that.  The internet works using post/gets and returned results.  You would pass a variable to the other application by using the query string in the URL, or a posted form collection method you determine.

    ....aspx?VariableFromApp1Name=Value

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 10, 2019 7:27 PM
  • User1045460610 posted

    I coded a encrypted method with aes compliant encryption, salt passphrase, and expiring date but the variable is the account number so the director doesn't want that passed in a url. I've read at least 14 methods to pass data. It looks like form post data or session variables would be good. I don't see any url tokens in the browser when I look at pages on the portal. They must be using form post data. I'll look through the code and see what they're doing. Thanks

    Tuesday, September 10, 2019 8:10 PM