I am trying impersonation in remoting ..
The program runs fine when i turn off impersonation. I am running client and server both on the same machine(VISTA).
I have created the user account on the machine .. and it runs fine when i use secure channel and turn impersonation off..
I have also checked that when impersonation is off and using secure channel .. it allows only the users that i have created to logon .. otherwise it gives authentication failure.
Following is the code :
public class cls_server
static void Main(string args)
//TcpChannel channel = new TcpChannel(8080);
IDictionary props = (IDictionary) new Hashtable();
//BinaryClientFormatterSinkProvider cp = new BinaryClientFormatterSinkProvider();
//BinaryServerFormatterSinkProvider sp = new BinaryServerFormatterSinkProvider();
IChannel chan = new TcpChannel(props,null,null);
I have login page and a main page in the asp.net application.In web.config, session Timeout value is set as 5 mins.
My requirements are as below
1.If the main page is idle for 5 mins, the session will expire and the same page will be retained. If the user tries to do some action then it has to redirect to loginpage.
1.comes to session end event in global.asax and the retain the main page
2.comes to session start event in global.asax after the user tries to do some action.
3.check the condition and redirects to login page
2.If the session ends at the time of some action is going in the main page(eg executing a stored procedure for a long time ) then the session has to continue upto the action gets finished.Once it is completed session timeout value has to reset as original value (5 mins)
1. Comes to session end event and assigns the session timeout value to retain the running process in the main page.
I have used the following code to do the above requirements.It is working fine in IIS V5.1 and not working in IIs 6.0 in win 2003 server Web.config
This is the most funniest code . It means it will try to resolve the dns of the host. Even I saw this. I dont know how people give suggestions to these to resolve IP. ..
If you are using localhost, the ip will always be 127.0.0.1 as the server and client both the same. Try putting in IIS and get the IP from your local machine. I think you will get the IP address properly.
You can also try
If the user is behind a proxy then REMOTE_ADDR will be the proxy IP address and HTTP_X_FORWARDED_FOR will be the client IP address. HTTP_X_FORWARDED_FOR can consist of multiple comma separated IP addresses for each proxy the request passes through. Generally, client IP is the first of them.
Finally, you can rely on the above methods only for Transparent proxies. There is no way to trace the actual IP in case of Anonymous or Distorting proxies.
One more good tool for finding country from an IP is this one[^] on codeplex.
Please Help ,I have 3 day for my presentation in university just
I put a Login Name control into My pages but it show my page name.I am sure User Log in because Login Status Control show LoggedIN template but LoginName Can't show how user login.
I use VS2008(C#) without service pack.PLZ Hlp
I am using Windows Server 2003 + VSTS 2008 + .Net 3.5 + C# + ASP.Net + IIS 6.0. I host some files (wmv video file and html file) on the web server, I want to know whether there are any easy to use authentication approach to let user input username and password before they can access (I want to prevent anonymous access)? Since the web site has also aspx ASP.Net page, and I want to use an unified authentication solution for wmv, html and aspx page. If prefer any solution which utilizes username and password stored in SQL Server database which my application already has/use.