Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Server Variables

Status
Not open for further replies.

schwarem

Programmer
Joined
Apr 18, 2002
Messages
159
Location
US
I am creating an ASP.Net application that will use a single sign-on system. The single sign-on system sets its own server variable ("ObUser"). Is there a way I can set this variable on my local machine to do testing? Everything I try says I do not have permission to modify the server variables.
 
you can assign application level variables. so why bother using server whrn all you need is at application level?

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I think schwarem is implying that the single sign on system is already in place and cannot be changed, and that he/she would like to be able to simulate this in a testing environment.

In this case you will need to add a level of abstraction to your code, so that whatever the sign on system is can vary. So, in your code do not directly access SERVER_VARIABLES("ObUser") but something else which you create to simulate it.

Think about how the IPrincipal thing works. In our code we can have User.Identity.Name whether we're using Forms Authetication or Windows Authentication because either wasy it's a common interface that we're working with.

You need to create some kind of way in which you can abstract whatever you need from the Server Varaibles into it's interface, so that you can configure it for testing or real-world and your code won't know the difference.

That'a very general answer, but it's a start.


[pipe]
 
I didn't get the ServerVariable set, but I did get the system working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top