473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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("secureContext",
Direction:=SoapHeaderDirection.InOut)> _
Public Function LoginUser() As Boolean
If secureContext Is Nothing Then Return False
If secureContext.userID = "Test" And
secureContext.password = "TestPassword" Then
FormsAuthentication.SetAuthCookie
(secureContext.userID, True, "C:\CookieTest")
Return True
Else
Return False
End If
End Function
Nov 12 '05 #1
0 1452

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

Similar topics

4
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...
2
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....
4
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...
2
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...
2
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 =...
4
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...
7
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...
1
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"...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.