473,659 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Authorization Cookie

Hi all,

I'm having trouble setting an authorization cookie from a
web service. I need to set an authorization cookie on the
client machine when the proper soap header is sent with
username/password.

This piece works fine and authenticates against the soap
header but my authorization cookie will not set.

What are the requirements for setting the cookie? Do I
have to change the Web.config file or something else? The
code is provided below. Thank you for your help.

<WebMethod(), SoapHeader("sec ureContext",
Direction:=Soap HeaderDirection .InOut)> _
Public Function LoginUser() As Boolean
If secureContext Is Nothing Then Return False
If secureContext.u serID = "Test" And
secureContext.p assword = "TestPasswo rd" Then
FormsAuthentica tion.SetAuthCoo kie
(secureContext. userID, True, "C:\CookieTest" )
Return True
Else
Return False
End If
End Function
Nov 12 '05 #1
0 1466

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11835
by: Joseph | last post by:
I have an intranet application that I setup using windows authentication through IIS basic authentication. Is there a way to set a timeout, so that after ten minutes the user will be prompted again to enter their login ID and password? I have not been able to find anything on microsoft or google. Other than this, the only way a user will be prompted again is if they are forced to open a new browser window for getting to the web page. ...
2
1273
by: Kian Goh | last post by:
Hi there, I am trying to use an entry level security for my resources website. I followed the procedures in the MS published Self-Paced Training Kit, everything seems working as expected. However, I found that the authentication cookie never expires. I thought the default timeout is 30 minutes. Please tell me if I miss any step...
4
1557
by: Mark Olbert | last post by:
I am having a devil of a time trying to get Forms authentication to work in a very simple test webapp (I've gotten it to work many, many times when developing on my WinXP client box, but I've just switched to doing development/debug on a Win2K server with IIS5, and something is obviously wrong). Here's the site: login.aspx /ssl/members/members.aspx
2
2573
by: junlia | last post by:
Hi All, I am working on a project that acts as a bridge. It does some checking with post xml data, and then redirects the request to an appropriate page. However, we find that depends on the browser cache setting (and OS), the program behaves differently. This is how it should work: 1. The client program opens a webbrowser control, using navigate2 method to post xml data to my aspx pages, eg abc.aspx
2
2745
by: craigkenisston | last post by:
Hi, I create a one day ticket in my authentication code like this : private void btnLogin_Click(object sender, System.EventArgs e) { string _userId = txtUserId.Text; string _password = txtPassword.Text;
4
2546
by: Amil | last post by:
I'm using Forms authorization. In my <forms> section I have timeout="30", but when I examine the cookie, it shows it expiring in 2055? Why? <authentication mode="Forms"> <forms loginUrl="/login.aspx" protection="All" timeout="30" path="/"> <credentials passwordFormat="Clear">
7
1294
by: dee | last post by:
When i sign on using <authentication mode="Forms"> <forms loginUrl="LogIn.aspx"/> </authentication> My login code is: If MyCheckPassword(name, pwd) Then FormsAuthentication.RedirectFromLoginPage(name, True)
1
6476
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
4
7342
by: SevDer | last post by:
Hi, I've done some coding in my web application however right now for an unknown reason my asp.net 2.0 site is not setting asp.net_sessionid cookie and as a result, I am losing the session data in each page refresh or redirect. I really do not have any coding against how the session works. And I have not changed any setting in IIS. I even compared the 2 code(old and new) bases and didn't see anything funny
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.