No Joke, Why don’t you read about integrated authentication? Let IIS pass the windows (.net) authentication to Domino? We use this feature and our .net developpers and users are happy and I do not allow anonymous access to our servers
You are probably frustrated with Domino becuase you don’t fully understand the product. Some education would be helpful.
Take a class on domino or hire a real domino developer.
You first mention you don’t like anonymous access but then you say domino is asking for a user name and password - well then give it a domino user name and password.
What is the error? What user name and password are you trying? Is it a domino user or a .net user?
I am pretty sure you can add a cookie to Webservice request in .Net, so all you have to do is generate the token if you have a username and password. See this thread for help
Hi Lars I posted this on Interop, but figured I would post it here too in case someone else was ever looking for it.
It appears like I have this working. I add the following constructor and function to the reference.vb file that is created when you inport a wsdl to VS
Public Sub New(ByVal securityCookie As String)
MyBase.New()
Me.Url = "http://myhost.com/web.nsf/webservice"
_authCookieValue = securityCookie
End Sub
Protected Overrides Function GetWebRequest(ByVal Uri As Uri) As
System.Net.WebRequest
Dim request As System.Net.WebRequest
request = MyBase.GetWebRequest(Uri)
request.Headers.Add("Cookie", "LtpaToken=" & _authCookieValue)
Return request
End Function
securityCookie in the constructor is the LtpaToken of the user or admin depending on how you want to do it. If I am running as a user other than the current user, I have a function that I use to generate an admin LtpaToken.
‘’’
''' Generates a Notes Security Cookie for the specified user/password combo
''' </summary>
''' <param name="loginUrl">The url to post to. (ex http://mycompany.com/names.nsf?Login)</param>
''' <param name="cookieName">The name of the returning cookine. (ex LtpaToken)</param>
''' <param name="userName">The username of the account to log in with</param>
''' <param name="password">The password of the account to log in with</param>
''' <returns type="System.Web.HttpCookie">The cookie generated with the login credentials</returns>
Public Shared Function GenerateLtpaToken(ByVal loginUrl As String, ByVal cookieName As String, ByVal userName As String, ByVal password As String) As System.Web.HttpCookie
'Put user code to initialize the page here
Dim req As HttpWebRequest
Dim res As System.Net.HttpWebResponse
Dim sr As System.IO.StreamReader
Dim cookieContainer As New System.Net.CookieContainer
Dim securityToken As String
Dim postDataByte As Byte()
Dim postStream As Stream
Dim retCode As Boolean = False
Dim authorizationCookie As System.web.HttpCookie
Try
System.Net.ServicePointManager.Expect100Continue = False
req = CType(WebRequest.Create(loginUrl), HttpWebRequest)
req.CookieContainer = New CookieContainer
'enncode the form data string into a byte array '
postDataByte = System.Text.Encoding.ASCII.GetBytes("username=" & userName & "&password=" & password)
'indicate that you will be posting the data
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.ContentLength = postDataByte.Length
req.AllowAutoRedirect = False
'send the form
postStream = req.GetRequestStream()
postStream.Write(postDataByte, 0, postDataByte.Length)
' Close the post
postStream.Close()
res = CType(req.GetResponse(), HttpWebResponse)
res.Cookies = req.CookieContainer.GetCookies(req.RequestUri)
'read in the page
'sr = New System.IO.StreamReader(res.GetResponseStream())
' Get the specified cookie
If Not res.Cookies(cookieName) Is Nothing Then
'_AuthorizationCookie = CType(res.Cookies.Item(_authorizationCookieName), System.Web.HttpCookie)
Dim responseCookie As Cookie = res.Cookies.Item(cookieName)
Dim passThruCookie As New System.Web.HttpCookie(cookieName)
' Convert the cookie to an httpCookie
passThruCookie.Domain = responseCookie.Domain
passThruCookie.Value = responseCookie.Value
passThruCookie.Expires = responseCookie.Expires
passThruCookie.Path = responseCookie.Path
authorizationCookie = passThruCookie
End If
Return authorizationCookie
Catch ex As Exception
Throw ex
End Try
End Function