Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Thursday, March 29, 2012

passing values from a web page into windows form application

Hi guys,

How can I pass session/application values from a web page (ASP or
ASP.NET) that is on a host company, into my cliente application?

So I can hide menus based on access permisions once the user makes the
log in in the web page by the application.

I'm using VB.NET with Web Control COM

Thank you

Bruno Alexandre
(Sintra, PORTUGAL)Hi Bruno,

You could post the values to a page from your site containing a vb6
component. The vb6 component would run in-process and with a reference to
the 'Microsoft Active Server Pages Object Library' you could then query the
session and application variables ASPTypeLibrary.Session and
ASPTypeLibrary.Application.
I have a sample program which isfreely available from a demonstration I did
on this a while back available at
http://www.crainiate.net/downloads/vb6wsdemo.zip

This component would then need to notify your application across process's,
there are a number of ways of doing this.

Your client would however need to run IIS, so this solution is limited to
windows2000 or windowsXP.

Kind regards,
James

--
Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

"Bruno Alexandre" <bruno.alexandre@.filtrarte.com> wrote in message
news:uWoY6OsoDHA.2188@.TK2MSFTNGP11.phx.gbl...
> Hi guys,
> How can I pass session/application values from a web page (ASP or
> ASP.NET) that is on a host company, into my cliente application?
> So I can hide menus based on access permisions once the user makes the
> log in in the web page by the application.
> I'm using VB.NET with Web Control COM
>
> Thank you
> Bruno Alexandre
> (Sintra, PORTUGAL)

Monday, March 26, 2012

passing variable to open a new window

I am new to asp.net. I am wondering how I can open a new window from a button or link. I need to pass a value so both windows are linked. I will appreciate any help, code vb.net

The main page has a label is that stores the ID number, I need to pass this value so I can display in the new window information about this id. Please help. Thanks.

use the Querystring to pass variables to other pages

ie.


Response.Redirect("www.myplace.com/mynewpage.aspx?someValue=399393","_blank");

check this out

http://www.codeproject.com/aspnet/QueryString.asp

hth,

mcm


how about javascript?

<asp:button onclientClick='window.open(.....);' Text='Open New Window' runat=server />


Thanks for the answer. However, I need to open a new window. Could you please help me out? I am using vb.net. Thanks.

javascript DOES open a new window.

read about it. -->http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

mcm


You can test the below code in page_load event which will open a new window using javascript

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id=123','','height=400,width=300');",true)

Where WebForm2.aspx is the name of the window you would like to open. Now in webform2 you can get the value of id using

Dim id as String = Request.QueryString("id")

HC


Yes. But I need to pass from the current window, a value which is saved in a label, to the new window. Thanks for the answer.

dim yourPassInVar as string

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id='" + yourPassInVar + ",'','height=400,width=300');",true)

How about this?



In the current window page_load event use the below code if you want the window to open direclty when the page is being loaded

Page.ClientScript.RegisterStartupScript(me.GetType(),"open","window.open('WebForm2.aspx?id=' + '"+Label1.Text+"','','height=400,width=300');",true)

If you want for example to open it on button click event use the below code

Button1.Attributes.Add("onclick","window.open('WebForm2.aspx?id=' + '"+Label1.Text+"','','height=400,width=300');")

Where Button1 is the button you want to open the window when being clicked

HC


Thanks. How can I do it with a button? When clicking on the button, the variable that holds the id value let's say 123 will be passed to webform2.aspx. Again, thanks for the help.

Great. Thank you for all the help!

;-)

Saturday, March 24, 2012

passing variables between two different windows

Hello. I'm a rookie ASP VBScripter and am having a difficult time scripting
the following scenario:

I have an index.asp file that has a multi-line text box and a button of type
button. When the button is clicked a window is spawned with change.asp as
its source. There is a form with a few text boxes and with a button of type
submit and a cancel button of type button that just closes the window. What
I want to happen is I want the information entered in change.asp to be added
into the multi-line text box in index.asp when the submit button is clicked
in change.asp. Here are the index.asp and change.asp files:

//--index.asp----
<html>
<head>
<title>Product Listing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head
<script language="JavaScript" type="text/javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight );
function changeInfo()
{
var x = (screen.width - 400) / 2;
var y = (screen.height - 320) / 2;
var myWin = window.open("change.asp",null,"scrollbars=no, toolbar=no,
resizable=no, width=400, height=300, left="+x+" top="+y)
}
</script
<body>
<table width="554" cellpadding="5">
<tr>
<td width="400"><img src="http://pics.10026.com/?src=images/HouseValue 031.jpg" width="400"
height="300"></td>
<td width="3027" valign="top"><form name = "picInfo" id = "picInfo">
<textarea name="txtInfo" id="txtInfo" cols="40" rows="10"
wrap="soft" readonly>Press "Change" to enter information.</textarea>
<br>
<input type="button" value="Change" id="btnChange" name="btnChange"
onClick="javascript:changeInfo()">
</form></td>
</tr>
</table>
</body>
</html>
//-----------
//---change.asp------
<html>
<head>
<title>Edit Product Description</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="JavaScript" type="text/javascript">
function Cancel()
{
window.close();
}
</script>
<body>
<form name="frmChange" id="frmChange" method="post">
<table>
<tr>
<td align="right">Product Name:</td>
<td align="left"><input type="text" name="txtProduct" id="txtProduct"
size="40"></td>
</tr>
<tr>
<td align="right">Model #:</td>
<td align="left"><input type="text" name="txtModel" id="txtModel"
size="40"></td>
</tr>
<tr>
<td align="right">Value:</td>
<td align="left"><input type="text" name="txtValue" id="txtValue"></td>
</tr>
<tr>
<td align="right">Category:</td>
<td align="left"><select name="mnuCategory" id="mnuCategory">
<option selected value="NULL">Choose category...</option>
<option value="Furniture">Furniture</option>
<option value="Electronics">Electronics</option>
<option value="Home Media">Home Media</option>
<option value="Jewlery">Jewlery</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top">Misc. Information:</td>
<td align="left"><textarea name="txtMisc" id="txtMisc" cols="30"
rows="5"></textarea></td>
</tr>
</table>
<br>
<center>
<input type="submit" name="btnSubmitChanges" id="btnSubmitChanges"
value="Submit">
<input type="button" name="btnCancel" id="btnCancel" value="Cancel"
onClick="javascript:Cancel()">
</center>
</form>
</body>
</html>
//--------

I've been messing with it for a day now and I have been unable to pass
variables from change.asp into index.asp. Any help would be much
appreciated.

~Les PeabodySounds like you'll be needing to use some client side javascript.
You can open a new window using javascript such as this:
a=window.open('MyPage.aspx','_new')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/...hods/open_0.asp

From that new window you can reference the original parent window with
this javascript reference:

Here's an example:
window.opener.document.form1.mytextbox.value = 'whatever';

Here's more info:
http://www.mozilla.org/docs/dom/dom...ndow_ref77.html

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Les Peabody" <les.peabody@.geo-sync.com> wrote in message
news:eGyXyv62DHA.1184@.TK2MSFTNGP10.phx.gbl...
> Hello. I'm a rookie ASP VBScripter and am having a difficult time
scripting
> the following scenario:
> I have an index.asp file that has a multi-line text box and a button of
type
> button. When the button is clicked a window is spawned with change.asp as
> its source. There is a form with a few text boxes and with a button of
type
> submit and a cancel button of type button that just closes the window.
What
> I want to happen is I want the information entered in change.asp to be
added
> into the multi-line text box in index.asp when the submit button is
clicked
> in change.asp. Here are the index.asp and change.asp files:
> //--index.asp----
> <html>
> <head>
> <title>Product Listing</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <script language="JavaScript" type="text/javascript">
> self.moveTo(0,0);
> self.resizeTo(screen.availWidth,screen.availHeight );
> function changeInfo()
> {
> var x = (screen.width - 400) / 2;
> var y = (screen.height - 320) / 2;
> var myWin = window.open("change.asp",null,"scrollbars=no, toolbar=no,
> resizable=no, width=400, height=300, left="+x+" top="+y)
> }
> </script>
> <body>
> <table width="554" cellpadding="5">
> <tr>
> <td width="400"><img src="http://pics.10026.com/?src=images/HouseValue 031.jpg" width="400"
> height="300"></td>
> <td width="3027" valign="top"><form name = "picInfo" id = "picInfo">
> <textarea name="txtInfo" id="txtInfo" cols="40" rows="10"
> wrap="soft" readonly>Press "Change" to enter information.</textarea>
> <br>
> <input type="button" value="Change" id="btnChange" name="btnChange"
> onClick="javascript:changeInfo()">
> </form></td>
> </tr>
> </table>
> </body>
> </html>
> //-----------
> //---change.asp------
> <html>
> <head>
> <title>Edit Product Description</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <script language="JavaScript" type="text/javascript">
> function Cancel()
> {
> window.close();
> }
> </script>
> <body>
> <form name="frmChange" id="frmChange" method="post">
> <table>
> <tr>
> <td align="right">Product Name:</td>
> <td align="left"><input type="text" name="txtProduct" id="txtProduct"
> size="40"></td>
> </tr>
> <tr>
> <td align="right">Model #:</td>
> <td align="left"><input type="text" name="txtModel" id="txtModel"
> size="40"></td>
> </tr>
> <tr>
> <td align="right">Value:</td>
> <td align="left"><input type="text" name="txtValue" id="txtValue"></td>
> </tr>
> <tr>
> <td align="right">Category:</td>
> <td align="left"><select name="mnuCategory" id="mnuCategory">
> <option selected value="NULL">Choose category...</option>
> <option value="Furniture">Furniture</option>
> <option value="Electronics">Electronics</option>
> <option value="Home Media">Home Media</option>
> <option value="Jewlery">Jewlery</option>
> </select></td>
> </tr>
> <tr>
> <td align="right" valign="top">Misc. Information:</td>
> <td align="left"><textarea name="txtMisc" id="txtMisc" cols="30"
> rows="5"></textarea></td>
> </tr>
> </table>
> <br>
> <center>
> <input type="submit" name="btnSubmitChanges" id="btnSubmitChanges"
> value="Submit">
> <input type="button" name="btnCancel" id="btnCancel" value="Cancel"
> onClick="javascript:Cancel()">
> </center>
> </form>
> </body>
> </html>
> //--------
> I've been messing with it for a day now and I have been unable to pass
> variables from change.asp into index.asp. Any help would be much
> appreciated.
> ~Les Peabody
That worked great, I figured there would be a way to access the parent
window. Thanks Steve.

~Les Peabody

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:%23tVzF162DHA.1752@.tk2msftngp13.phx.gbl...
> Sounds like you'll be needing to use some client side javascript.
> You can open a new window using javascript such as this:
> a=window.open('MyPage.aspx','_new')
> There are all kinds of options for setting window properties such as
window
> size and toolbar visibility.
> Here's more info:
http://msdn.microsoft.com/workshop/...hods/open_0.asp
> From that new window you can reference the original parent window with
> this javascript reference:
> Here's an example:
> window.opener.document.form1.mytextbox.value = 'whatever';
> Here's more info:
> http://www.mozilla.org/docs/dom/dom...ndow_ref77.html
> --
> I hope this helps,
> Steve C. Orr, MCSD
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "Les Peabody" <les.peabody@.geo-sync.com> wrote in message
> news:eGyXyv62DHA.1184@.TK2MSFTNGP10.phx.gbl...
> > Hello. I'm a rookie ASP VBScripter and am having a difficult time
> scripting
> > the following scenario:
> > I have an index.asp file that has a multi-line text box and a button of
> type
> > button. When the button is clicked a window is spawned with change.asp
as
> > its source. There is a form with a few text boxes and with a button of
> type
> > submit and a cancel button of type button that just closes the window.
> What
> > I want to happen is I want the information entered in change.asp to be
> added
> > into the multi-line text box in index.asp when the submit button is
> clicked
> > in change.asp. Here are the index.asp and change.asp files:
> > //--index.asp----
> > <html>
> > <head>
> > <title>Product Listing</title>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> > </head>
> > <script language="JavaScript" type="text/javascript">
> > self.moveTo(0,0);
> > self.resizeTo(screen.availWidth,screen.availHeight );
> > function changeInfo()
> > {
> > var x = (screen.width - 400) / 2;
> > var y = (screen.height - 320) / 2;
> > var myWin = window.open("change.asp",null,"scrollbars=no, toolbar=no,
> > resizable=no, width=400, height=300, left="+x+" top="+y)
> > }
> > </script>
> > <body>
> > <table width="554" cellpadding="5">
> > <tr>
> > <td width="400"><img src="http://pics.10026.com/?src=images/HouseValue 031.jpg" width="400"
> > height="300"></td>
> > <td width="3027" valign="top"><form name = "picInfo" id = "picInfo">
> > <textarea name="txtInfo" id="txtInfo" cols="40" rows="10"
> > wrap="soft" readonly>Press "Change" to enter information.</textarea>
> > <br>
> > <input type="button" value="Change" id="btnChange" name="btnChange"
> > onClick="javascript:changeInfo()">
> > </form></td>
> > </tr>
> > </table>
> > </body>
> > </html>
> > //-----------
> > //---change.asp------
> > <html>
> > <head>
> > <title>Edit Product Description</title>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> > </head>
> > <script language="JavaScript" type="text/javascript">
> > function Cancel()
> > {
> > window.close();
> > }
> > </script>
> > <body>
> > <form name="frmChange" id="frmChange" method="post">
> > <table>
> > <tr>
> > <td align="right">Product Name:</td>
> > <td align="left"><input type="text" name="txtProduct" id="txtProduct"
> > size="40"></td>
> > </tr>
> > <tr>
> > <td align="right">Model #:</td>
> > <td align="left"><input type="text" name="txtModel" id="txtModel"
> > size="40"></td>
> > </tr>
> > <tr>
> > <td align="right">Value:</td>
> > <td align="left"><input type="text" name="txtValue" id="txtValue"></td>
> > </tr>
> > <tr>
> > <td align="right">Category:</td>
> > <td align="left"><select name="mnuCategory" id="mnuCategory">
> > <option selected value="NULL">Choose category...</option>
> > <option value="Furniture">Furniture</option>
> > <option value="Electronics">Electronics</option>
> > <option value="Home Media">Home Media</option>
> > <option value="Jewlery">Jewlery</option>
> > </select></td>
> > </tr>
> > <tr>
> > <td align="right" valign="top">Misc. Information:</td>
> > <td align="left"><textarea name="txtMisc" id="txtMisc" cols="30"
> > rows="5"></textarea></td>
> > </tr>
> > </table>
> > <br>
> > <center>
> > <input type="submit" name="btnSubmitChanges" id="btnSubmitChanges"
> > value="Submit">
> > <input type="button" name="btnCancel" id="btnCancel" value="Cancel"
> > onClick="javascript:Cancel()">
> > </center>
> > </form>
> > </body>
> > </html>
> > //--------
> > I've been messing with it for a day now and I have been unable to pass
> > variables from change.asp into index.asp. Any help would be much
> > appreciated.
> > ~Les Peabody

Wednesday, March 21, 2012

Passing variables values

Hi gurus,
I have a little complex question for you all, that I hope you can help me.

I have a windows application that comunicate with another dll's
applications. My Win app have some menus (like Outlook bar) and each menu
can have many icons or function as you want. This icons can call forms from
any dll app that I have too. Ok, so far so good... Know I want to have a
form that have a Web Browser control for calling a page that I made in
ASP.NET.
My Win app have the current user that is using app, the problem when I have
to pass the user Id value to the page in APS.NET.
How can I pass this value? How can I "comunicate" between Win and Web forms.

NOTE: I must say another thing: the Win app is in Visual Studio 6.0.

--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
rucayou can catch events and access the webbrowser dom. you could use standard
authencation on the asp.net site, or fill in a hidden field on the page
before post.

-- bruce (sqlwork.com)

"ruca" <ruuca@.iol.pt> wrote in message
news:uZnzx%23F2EHA.3336@.TK2MSFTNGP11.phx.gbl...
| Hi gurus,
| I have a little complex question for you all, that I hope you can help me.
|
| I have a windows application that comunicate with another dll's
| applications. My Win app have some menus (like Outlook bar) and each menu
| can have many icons or function as you want. This icons can call forms
from
| any dll app that I have too. Ok, so far so good... Know I want to have a
| form that have a Web Browser control for calling a page that I made in
| ASP.NET.
| My Win app have the current user that is using app, the problem when I
have
| to pass the user Id value to the page in APS.NET.
| How can I pass this value? How can I "comunicate" between Win and Web
forms.
|
| NOTE: I must say another thing: the Win app is in Visual Studio 6.0.
|
|
| --
| Programming ASP.NET with VB.NET
| Thank's (if you try to help me)
| Hope this help you (if I try to help you)
| ruca
|
|
Can you be more specific please? I don't uderstand very well. Sorry... :)

I forgot to tell you that the Win app already have a login. The only thing
that I want is to pass the user ID to the Web.

--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"bruce barker" <nospam_brubar@.safeco.com> escreveu na mensagem
news:u$BRqHJ2EHA.2192@.TK2MSFTNGP14.phx.gbl...
> you can catch events and access the webbrowser dom. you could use standard
> authencation on the asp.net site, or fill in a hidden field on the page
> before post.
> -- bruce (sqlwork.com)
>
> "ruca" <ruuca@.iol.pt> wrote in message
> news:uZnzx%23F2EHA.3336@.TK2MSFTNGP11.phx.gbl...
> | Hi gurus,
> | I have a little complex question for you all, that I hope you can help
> me.
> |
> | I have a windows application that comunicate with another dll's
> | applications. My Win app have some menus (like Outlook bar) and each
> menu
> | can have many icons or function as you want. This icons can call forms
> from
> | any dll app that I have too. Ok, so far so good... Know I want to have
> a
> | form that have a Web Browser control for calling a page that I made in
> | ASP.NET.
> | My Win app have the current user that is using app, the problem when I
> have
> | to pass the user Id value to the page in APS.NET.
> | How can I pass this value? How can I "comunicate" between Win and Web
> forms.
> |
> | NOTE: I must say another thing: the Win app is in Visual Studio 6.0.
> |
> |
> | --
> | Programming ASP.NET with VB.NET
> | Thank's (if you try to help me)
> | Hope this help you (if I try to help you)
> | ruca
> |
> |

Passing variables values

Hi gurus,
I have a little complex question for you all, that I hope you can help me.
I have a windows application that comunicate with another dll's
applications. My Win app have some menus (like Outlook bar) and each menu
can have many icons or function as you want. This icons can call forms from
any dll app that I have too. Ok, so far so good... Know I want to have a
form that have a Web Browser control for calling a page that I made in
ASP.NET.
My Win app have the current user that is using app, the problem when I have
to pass the user Id value to the page in APS.NET.
How can I pass this value? How can I "comunicate" between Win and Web forms.
NOTE: I must say another thing: the Win app is in Visual Studio 6.0.
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
rucayou can catch events and access the webbrowser dom. you could use standard
authencation on the asp.net site, or fill in a hidden field on the page
before post.
-- bruce (sqlwork.com)
"ruca" <ruuca@.iol.pt> wrote in message
news:uZnzx%23F2EHA.3336@.TK2MSFTNGP11.phx.gbl...
| Hi gurus,
| I have a little complex question for you all, that I hope you can help me.
|
| I have a windows application that comunicate with another dll's
| applications. My Win app have some menus (like Outlook bar) and each menu
| can have many icons or function as you want. This icons can call forms
from
| any dll app that I have too. Ok, so far so good... Know I want to have a
| form that have a Web Browser control for calling a page that I made in
| ASP.NET.
| My Win app have the current user that is using app, the problem when I
have
| to pass the user Id value to the page in APS.NET.
| How can I pass this value? How can I "comunicate" between Win and Web
forms.
|
| NOTE: I must say another thing: the Win app is in Visual Studio 6.0.
|
|
| --
| Programming ASP.NET with VB.NET
| Thank's (if you try to help me)
| Hope this help you (if I try to help you)
| ruca
|
|
Can you be more specific please? I don't uderstand very well. Sorry... :)
I forgot to tell you that the Win app already have a login. The only thing
that I want is to pass the user ID to the Web.
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
"bruce barker" <nospam_brubar@.safeco.com> escreveu na mensagem
news:u$BRqHJ2EHA.2192@.TK2MSFTNGP14.phx.gbl...
> you can catch events and access the webbrowser dom. you could use standard
> authencation on the asp.net site, or fill in a hidden field on the page
> before post.
> -- bruce (sqlwork.com)
>
> "ruca" <ruuca@.iol.pt> wrote in message
> news:uZnzx%23F2EHA.3336@.TK2MSFTNGP11.phx.gbl...
> | Hi gurus,
> | I have a little complex question for you all, that I hope you can help
> me.
> |
> | I have a windows application that comunicate with another dll's
> | applications. My Win app have some menus (like Outlook bar) and each
> menu
> | can have many icons or function as you want. This icons can call forms
> from
> | any dll app that I have too. Ok, so far so good... Know I want to have
> a
> | form that have a Web Browser control for calling a page that I made in
> | ASP.NET.
> | My Win app have the current user that is using app, the problem when I
> have
> | to pass the user Id value to the page in APS.NET.
> | How can I pass this value? How can I "comunicate" between Win and Web
> forms.
> |
> | NOTE: I must say another thing: the Win app is in Visual Studio 6.0.
> |
> |
> | --
> | Programming ASP.NET with VB.NET
> | Thank's (if you try to help me)
> | Hope this help you (if I try to help you)
> | ruca
> |
> |
>

Passing windows credentials from server to server.

Hello,

I have been desperately trying to programmatically authenticate a windows
user, create their credentials, and then redirect them to a different server
while passing the credentials at the same time so that they don't have to
login again.

Specifically, I have two webservers in the same domain. When I have a user
go to Webserver A (which uses basic authentication) I programmatically
create either a user credential or impersonate a user context (for now it's
hardcoded, but in the future it would be entered in forms). Then, I want to
let that user access a page on Webserver B (which uses basic
authentication), but I don't want them to have to login again -- rather, I
want to use the user context that I programmatically created on Webserver A.

For instance, here is an example of the code I use to create the user
credentials:

Dim strURI = "http://www.whatever.com"
Dim myCred As New NetworkCredential("userid", "password", "domain")
Dim myURI As New Uri(strURI)
Dim myCache As New CredentialCache
myCache.Add(myURI, "Basic", myCred)

From this, I have attempted to use WebRequests and WebResponses to somehow
allow me to direct the browser to a different page, and use the credential I
have generated. The most I can do, however, is create the request and
receive the response:

Dim myWebRequest As System.Net.WebRequest =
System.Net.WebRequest.Create(strURI)
myWebRequest.Credentials = myCache
Dim myWebResponse As WebResponse = myWebRequest.GetResponse()

If only I could use the response.redirect method, and somehow pass the
credentials with the redirection (like you can with the webrequest), it
could work!

I have also attempted to use the LogonUser API (from the advapi32.dll), and
impersonate a user based on the proper logon information -- this works, and
I'm able to successfully impersonate the user, but again, I don't know how
to pass along the user context to a different page.

I know that many people will say "just use form based authentication," but
this will not work for me, as I want this to work with tools like Outlook
Web Access, which requires windows authentication.

Any help would be greatly appreciated. Thank you!!

Wadewhile your only option is to use redirect to
http://username:password@.somesite.com (if using basic), I wouldn't do that
either.

anything else -- can't do.

"Wade Wegner" <wwegner23@.hotmail.com> wrote in message
news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I have been desperately trying to programmatically authenticate a windows
> user, create their credentials, and then redirect them to a different
server
> while passing the credentials at the same time so that they don't have to
> login again.
> Specifically, I have two webservers in the same domain. When I have a
user
> go to Webserver A (which uses basic authentication) I programmatically
> create either a user credential or impersonate a user context (for now
it's
> hardcoded, but in the future it would be entered in forms). Then, I want
to
> let that user access a page on Webserver B (which uses basic
> authentication), but I don't want them to have to login again -- rather, I
> want to use the user context that I programmatically created on Webserver
A.
> For instance, here is an example of the code I use to create the user
> credentials:
> Dim strURI = "http://www.whatever.com"
> Dim myCred As New NetworkCredential("userid", "password", "domain")
> Dim myURI As New Uri(strURI)
> Dim myCache As New CredentialCache
> myCache.Add(myURI, "Basic", myCred)
> From this, I have attempted to use WebRequests and WebResponses to somehow
> allow me to direct the browser to a different page, and use the credential
I
> have generated. The most I can do, however, is create the request and
> receive the response:
> Dim myWebRequest As System.Net.WebRequest =
> System.Net.WebRequest.Create(strURI)
> myWebRequest.Credentials = myCache
> Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> If only I could use the response.redirect method, and somehow pass the
> credentials with the redirection (like you can with the webrequest), it
> could work!
> I have also attempted to use the LogonUser API (from the advapi32.dll),
and
> impersonate a user based on the proper logon information -- this works,
and
> I'm able to successfully impersonate the user, but again, I don't know how
> to pass along the user context to a different page.
> I know that many people will say "just use form based authentication,"
but
> this will not work for me, as I want this to work with tools like Outlook
> Web Access, which requires windows authentication.
> Any help would be greatly appreciated. Thank you!!
> Wade
if they are your own servers, you could set up a webservice to transfer
session info back and forth...

"Wade Wegner" <wwegner23@.hotmail.com> wrote in message
news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I have been desperately trying to programmatically authenticate a windows
> user, create their credentials, and then redirect them to a different
server
> while passing the credentials at the same time so that they don't have to
> login again.
> Specifically, I have two webservers in the same domain. When I have a
user
> go to Webserver A (which uses basic authentication) I programmatically
> create either a user credential or impersonate a user context (for now
it's
> hardcoded, but in the future it would be entered in forms). Then, I want
to
> let that user access a page on Webserver B (which uses basic
> authentication), but I don't want them to have to login again -- rather, I
> want to use the user context that I programmatically created on Webserver
A.
> For instance, here is an example of the code I use to create the user
> credentials:
> Dim strURI = "http://www.whatever.com"
> Dim myCred As New NetworkCredential("userid", "password", "domain")
> Dim myURI As New Uri(strURI)
> Dim myCache As New CredentialCache
> myCache.Add(myURI, "Basic", myCred)
> From this, I have attempted to use WebRequests and WebResponses to somehow
> allow me to direct the browser to a different page, and use the credential
I
> have generated. The most I can do, however, is create the request and
> receive the response:
> Dim myWebRequest As System.Net.WebRequest =
> System.Net.WebRequest.Create(strURI)
> myWebRequest.Credentials = myCache
> Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> If only I could use the response.redirect method, and somehow pass the
> credentials with the redirection (like you can with the webrequest), it
> could work!
> I have also attempted to use the LogonUser API (from the advapi32.dll),
and
> impersonate a user based on the proper logon information -- this works,
and
> I'm able to successfully impersonate the user, but again, I don't know how
> to pass along the user context to a different page.
> I know that many people will say "just use form based authentication,"
but
> this will not work for me, as I want this to work with tools like Outlook
> Web Access, which requires windows authentication.
> Any help would be greatly appreciated. Thank you!!
> Wade
Huh!

I never you could do that to pass login information to a site with basic
authentication. Is there a name for that? Something that would allow me to
look it up in MSDN? I wonder what the security considerations are. If used
with SSL, is it safe? Etc.

Thanks for the idea, though ... I'll look into it some more.

Wade

"Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
news:hjkHb.212029$I53.8627510@.twister.southeast.rr .com...
> while your only option is to use redirect to
> http://username:password@.somesite.com (if using basic), I wouldn't do that
> either.
> anything else -- can't do.
>
> "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> > Hello,
> > I have been desperately trying to programmatically authenticate a
windows
> > user, create their credentials, and then redirect them to a different
> server
> > while passing the credentials at the same time so that they don't have
to
> > login again.
> > Specifically, I have two webservers in the same domain. When I have a
> user
> > go to Webserver A (which uses basic authentication) I programmatically
> > create either a user credential or impersonate a user context (for now
> it's
> > hardcoded, but in the future it would be entered in forms). Then, I
want
> to
> > let that user access a page on Webserver B (which uses basic
> > authentication), but I don't want them to have to login again -- rather,
I
> > want to use the user context that I programmatically created on
Webserver
> A.
> > For instance, here is an example of the code I use to create the user
> > credentials:
> > Dim strURI = "http://www.whatever.com"
> > Dim myCred As New NetworkCredential("userid", "password", "domain")
> > Dim myURI As New Uri(strURI)
> > Dim myCache As New CredentialCache
> > myCache.Add(myURI, "Basic", myCred)
> > From this, I have attempted to use WebRequests and WebResponses to
somehow
> > allow me to direct the browser to a different page, and use the
credential
> I
> > have generated. The most I can do, however, is create the request and
> > receive the response:
> > Dim myWebRequest As System.Net.WebRequest =
> > System.Net.WebRequest.Create(strURI)
> > myWebRequest.Credentials = myCache
> > Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> > If only I could use the response.redirect method, and somehow pass the
> > credentials with the redirection (like you can with the webrequest), it
> > could work!
> > I have also attempted to use the LogonUser API (from the advapi32.dll),
> and
> > impersonate a user based on the proper logon information -- this works,
> and
> > I'm able to successfully impersonate the user, but again, I don't know
how
> > to pass along the user context to a different page.
> > I know that many people will say "just use form based authentication,"
> but
> > this will not work for me, as I want this to work with tools like
Outlook
> > Web Access, which requires windows authentication.
> > Any help would be greatly appreciated. Thank you!!
> > Wade
Okay, as I've been playing with the method you mentioned, I've noted the
following.

If I create a login form, and then programmatically create a URL string, and
then redirect to that URL, it prompts me to login. However, if I register a
vbscript that uses window.location to redirect the user to this script, it
doesn't. Does the response.redirect not work?

For example, this is what I use for the response.redirect:

Dim strURL as string
strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
"@.mydomain.com"

response.redirect(strURL)

That doesn't work, and it prompts me to login.

However, I can get the following to work fine:

Dim strURL as string
strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
"@.mydomain.com"

Dim txtScript as new System.Text.StringBuilder
txtScript.Append(vbCr & "<script language=vbscript>")
txtScript.Append(vbCr & "window.location = """ & strURL & """")
txtScript.Append(vbCr & "</script>" & vbCr & vbCr)

Page.RegisterStartupScript("redirect", txtScript.ToString)

When I redirect from the client, this works fine. Additionally, if I simply
type in the address into the browser, it works properly.

Any ideas? Will I have to do this from the client?

Thanks,

Wade

"Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
news:hjkHb.212029$I53.8627510@.twister.southeast.rr .com...
> while your only option is to use redirect to
> http://username:password@.somesite.com (if using basic), I wouldn't do that
> either.
> anything else -- can't do.
>
> "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> > Hello,
> > I have been desperately trying to programmatically authenticate a
windows
> > user, create their credentials, and then redirect them to a different
> server
> > while passing the credentials at the same time so that they don't have
to
> > login again.
> > Specifically, I have two webservers in the same domain. When I have a
> user
> > go to Webserver A (which uses basic authentication) I programmatically
> > create either a user credential or impersonate a user context (for now
> it's
> > hardcoded, but in the future it would be entered in forms). Then, I
want
> to
> > let that user access a page on Webserver B (which uses basic
> > authentication), but I don't want them to have to login again -- rather,
I
> > want to use the user context that I programmatically created on
Webserver
> A.
> > For instance, here is an example of the code I use to create the user
> > credentials:
> > Dim strURI = "http://www.whatever.com"
> > Dim myCred As New NetworkCredential("userid", "password", "domain")
> > Dim myURI As New Uri(strURI)
> > Dim myCache As New CredentialCache
> > myCache.Add(myURI, "Basic", myCred)
> > From this, I have attempted to use WebRequests and WebResponses to
somehow
> > allow me to direct the browser to a different page, and use the
credential
> I
> > have generated. The most I can do, however, is create the request and
> > receive the response:
> > Dim myWebRequest As System.Net.WebRequest =
> > System.Net.WebRequest.Create(strURI)
> > myWebRequest.Credentials = myCache
> > Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> > If only I could use the response.redirect method, and somehow pass the
> > credentials with the redirection (like you can with the webrequest), it
> > could work!
> > I have also attempted to use the LogonUser API (from the advapi32.dll),
> and
> > impersonate a user based on the proper logon information -- this works,
> and
> > I'm able to successfully impersonate the user, but again, I don't know
how
> > to pass along the user context to a different page.
> > I know that many people will say "just use form based authentication,"
> but
> > this will not work for me, as I want this to work with tools like
Outlook
> > Web Access, which requires windows authentication.
> > Any help would be greatly appreciated. Thank you!!
> > Wade
I don't like this approach (of passing credentials like this) at all.. it's
visible in the address bar.. so I'm not sure this is really a good idea.

it's an HTTP thingie.. so you would want to look at it there.. MSDN may have
it.. but may not...

"Wade Wegner" <wwegner23@.hotmail.com> wrote in message
news:uUmNq0hzDHA.1744@.TK2MSFTNGP12.phx.gbl...
> Okay, as I've been playing with the method you mentioned, I've noted the
> following.
> If I create a login form, and then programmatically create a URL string,
and
> then redirect to that URL, it prompts me to login. However, if I register
a
> vbscript that uses window.location to redirect the user to this script, it
> doesn't. Does the response.redirect not work?
> For example, this is what I use for the response.redirect:
> Dim strURL as string
> strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> "@.mydomain.com"
> response.redirect(strURL)
> That doesn't work, and it prompts me to login.
> However, I can get the following to work fine:
> Dim strURL as string
> strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> "@.mydomain.com"
> Dim txtScript as new System.Text.StringBuilder
> txtScript.Append(vbCr & "<script language=vbscript>")
> txtScript.Append(vbCr & "window.location = """ & strURL & """")
> txtScript.Append(vbCr & "</script>" & vbCr & vbCr)
> Page.RegisterStartupScript("redirect", txtScript.ToString)
> When I redirect from the client, this works fine. Additionally, if I
simply
> type in the address into the browser, it works properly.
> Any ideas? Will I have to do this from the client?
> Thanks,
> Wade
>
> "Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
> news:hjkHb.212029$I53.8627510@.twister.southeast.rr .com...
> > while your only option is to use redirect to
> > http://username:password@.somesite.com (if using basic), I wouldn't do
that
> > either.
> > anything else -- can't do.
> > "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> > news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> > > Hello,
> > > > I have been desperately trying to programmatically authenticate a
> windows
> > > user, create their credentials, and then redirect them to a different
> > server
> > > while passing the credentials at the same time so that they don't have
> to
> > > login again.
> > > > Specifically, I have two webservers in the same domain. When I have a
> > user
> > > go to Webserver A (which uses basic authentication) I programmatically
> > > create either a user credential or impersonate a user context (for now
> > it's
> > > hardcoded, but in the future it would be entered in forms). Then, I
> want
> > to
> > > let that user access a page on Webserver B (which uses basic
> > > authentication), but I don't want them to have to login again --
rather,
> I
> > > want to use the user context that I programmatically created on
> Webserver
> > A.
> > > > For instance, here is an example of the code I use to create the user
> > > credentials:
> > > > Dim strURI = "http://www.whatever.com"
> > > Dim myCred As New NetworkCredential("userid", "password",
"domain")
> > > Dim myURI As New Uri(strURI)
> > > Dim myCache As New CredentialCache
> > > myCache.Add(myURI, "Basic", myCred)
> > > > From this, I have attempted to use WebRequests and WebResponses to
> somehow
> > > allow me to direct the browser to a different page, and use the
> credential
> > I
> > > have generated. The most I can do, however, is create the request and
> > > receive the response:
> > > > Dim myWebRequest As System.Net.WebRequest =
> > > System.Net.WebRequest.Create(strURI)
> > > myWebRequest.Credentials = myCache
> > > Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> > > > If only I could use the response.redirect method, and somehow pass the
> > > credentials with the redirection (like you can with the webrequest),
it
> > > could work!
> > > > I have also attempted to use the LogonUser API (from the
advapi32.dll),
> > and
> > > impersonate a user based on the proper logon information -- this
works,
> > and
> > > I'm able to successfully impersonate the user, but again, I don't know
> how
> > > to pass along the user context to a different page.
> > > > I know that many people will say "just use form based authentication,"
> > but
> > > this will not work for me, as I want this to work with tools like
> Outlook
> > > Web Access, which requires windows authentication.
> > > > Any help would be greatly appreciated. Thank you!!
> > > > Wade
> >
See, I do not experience it displaying in the address bar. I have not been
able to find anything in MSDN concerning this, but I started to think that
all this method does is mimic what basic authentication does -- I mean,
basic authentication is unencrypted, clear text. Is employing this method
any different than using basic authentication? In both cases, obviously, it
would be worthwhile to encrypt using SSL.

I still wish I understood why this solution would not work if redirected
from the server, via response.redirect, but will if it is redirected at the
client. Even if this isn't a good solution, I'd like to know the answer to
that.

"Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
news:or3Ib.161313$Vu5.11592556@.twister.southeast.r r.com...
> I don't like this approach (of passing credentials like this) at all..
it's
> visible in the address bar.. so I'm not sure this is really a good idea.
> it's an HTTP thingie.. so you would want to look at it there.. MSDN may
have
> it.. but may not...
> "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> news:uUmNq0hzDHA.1744@.TK2MSFTNGP12.phx.gbl...
> > Okay, as I've been playing with the method you mentioned, I've noted the
> > following.
> > If I create a login form, and then programmatically create a URL string,
> and
> > then redirect to that URL, it prompts me to login. However, if I
register
> a
> > vbscript that uses window.location to redirect the user to this script,
it
> > doesn't. Does the response.redirect not work?
> > For example, this is what I use for the response.redirect:
> > Dim strURL as string
> > strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> > "@.mydomain.com"
> > response.redirect(strURL)
> > That doesn't work, and it prompts me to login.
> > However, I can get the following to work fine:
> > Dim strURL as string
> > strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> > "@.mydomain.com"
> > Dim txtScript as new System.Text.StringBuilder
> > txtScript.Append(vbCr & "<script language=vbscript>")
> > txtScript.Append(vbCr & "window.location = """ & strURL & """")
> > txtScript.Append(vbCr & "</script>" & vbCr & vbCr)
> > Page.RegisterStartupScript("redirect", txtScript.ToString)
> > When I redirect from the client, this works fine. Additionally, if I
> simply
> > type in the address into the browser, it works properly.
> > Any ideas? Will I have to do this from the client?
> > Thanks,
> > Wade
> > "Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
> > news:hjkHb.212029$I53.8627510@.twister.southeast.rr .com...
> > > while your only option is to use redirect to
> > > http://username:password@.somesite.com (if using basic), I wouldn't do
> that
> > > either.
> > > > anything else -- can't do.
> > > > > "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> > > news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> > > > Hello,
> > > > > > I have been desperately trying to programmatically authenticate a
> > windows
> > > > user, create their credentials, and then redirect them to a
different
> > > server
> > > > while passing the credentials at the same time so that they don't
have
> > to
> > > > login again.
> > > > > > Specifically, I have two webservers in the same domain. When I have
a
> > > user
> > > > go to Webserver A (which uses basic authentication) I
programmatically
> > > > create either a user credential or impersonate a user context (for
now
> > > it's
> > > > hardcoded, but in the future it would be entered in forms). Then, I
> > want
> > > to
> > > > let that user access a page on Webserver B (which uses basic
> > > > authentication), but I don't want them to have to login again --
> rather,
> > I
> > > > want to use the user context that I programmatically created on
> > Webserver
> > > A.
> > > > > > For instance, here is an example of the code I use to create the
user
> > > > credentials:
> > > > > > Dim strURI = "http://www.whatever.com"
> > > > Dim myCred As New NetworkCredential("userid", "password",
> "domain")
> > > > Dim myURI As New Uri(strURI)
> > > > Dim myCache As New CredentialCache
> > > > myCache.Add(myURI, "Basic", myCred)
> > > > > > From this, I have attempted to use WebRequests and WebResponses to
> > somehow
> > > > allow me to direct the browser to a different page, and use the
> > credential
> > > I
> > > > have generated. The most I can do, however, is create the request
and
> > > > receive the response:
> > > > > > Dim myWebRequest As System.Net.WebRequest =
> > > > System.Net.WebRequest.Create(strURI)
> > > > myWebRequest.Credentials = myCache
> > > > Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> > > > > > If only I could use the response.redirect method, and somehow pass
the
> > > > credentials with the redirection (like you can with the webrequest),
> it
> > > > could work!
> > > > > > I have also attempted to use the LogonUser API (from the
> advapi32.dll),
> > > and
> > > > impersonate a user based on the proper logon information -- this
> works,
> > > and
> > > > I'm able to successfully impersonate the user, but again, I don't
know
> > how
> > > > to pass along the user context to a different page.
> > > > > > I know that many people will say "just use form based
authentication,"
> > > but
> > > > this will not work for me, as I want this to work with tools like
> > Outlook
> > > > Web Access, which requires windows authentication.
> > > > > > Any help would be greatly appreciated. Thank you!!
> > > > > > Wade
> > > > > >
Look at HTTP specs... see what it says for 302 (that's what
response.redirect really is)...

as I said, all this is http stuff.. so MSDN may not have it (just like they
dont' have http specs there...) you'd probably want to start looking at
w3c's site

"Wade Wegner" <wwegner23@.hotmail.com> wrote in message
news:%233lbcWuzDHA.2160@.TK2MSFTNGP12.phx.gbl...
> See, I do not experience it displaying in the address bar. I have not
been
> able to find anything in MSDN concerning this, but I started to think that
> all this method does is mimic what basic authentication does -- I mean,
> basic authentication is unencrypted, clear text. Is employing this method
> any different than using basic authentication? In both cases, obviously,
it
> would be worthwhile to encrypt using SSL.
> I still wish I understood why this solution would not work if redirected
> from the server, via response.redirect, but will if it is redirected at
the
> client. Even if this isn't a good solution, I'd like to know the answer
to
> that.
>
> "Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
> news:or3Ib.161313$Vu5.11592556@.twister.southeast.r r.com...
> > I don't like this approach (of passing credentials like this) at all..
> it's
> > visible in the address bar.. so I'm not sure this is really a good idea.
> > it's an HTTP thingie.. so you would want to look at it there.. MSDN may
> have
> > it.. but may not...
> > "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> > news:uUmNq0hzDHA.1744@.TK2MSFTNGP12.phx.gbl...
> > > Okay, as I've been playing with the method you mentioned, I've noted
the
> > > following.
> > > > If I create a login form, and then programmatically create a URL
string,
> > and
> > > then redirect to that URL, it prompts me to login. However, if I
> register
> > a
> > > vbscript that uses window.location to redirect the user to this
script,
> it
> > > doesn't. Does the response.redirect not work?
> > > > For example, this is what I use for the response.redirect:
> > > > Dim strURL as string
> > > strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> > > "@.mydomain.com"
> > > > response.redirect(strURL)
> > > > That doesn't work, and it prompts me to login.
> > > > However, I can get the following to work fine:
> > > > Dim strURL as string
> > > strURL = "http://" & txtUserID.Text & ":" & txtPassword.Text &
> > > "@.mydomain.com"
> > > > Dim txtScript as new System.Text.StringBuilder
> > > txtScript.Append(vbCr & "<script language=vbscript>")
> > > txtScript.Append(vbCr & "window.location = """ & strURL & """")
> > > txtScript.Append(vbCr & "</script>" & vbCr & vbCr)
> > > > Page.RegisterStartupScript("redirect", txtScript.ToString)
> > > > When I redirect from the client, this works fine. Additionally, if I
> > simply
> > > type in the address into the browser, it works properly.
> > > > Any ideas? Will I have to do this from the client?
> > > > Thanks,
> > > > Wade
> > > > > > "Rad" <aspdotnet@.hot.spam.mail.com> wrote in message
> > > news:hjkHb.212029$I53.8627510@.twister.southeast.rr .com...
> > > > while your only option is to use redirect to
> > > > http://username:password@.somesite.com (if using basic), I wouldn't
do
> > that
> > > > either.
> > > > > > anything else -- can't do.
> > > > > > > > "Wade Wegner" <wwegner23@.hotmail.com> wrote in message
> > > > news:OULm1aKzDHA.2116@.TK2MSFTNGP10.phx.gbl...
> > > > > Hello,
> > > > > > > > I have been desperately trying to programmatically authenticate a
> > > windows
> > > > > user, create their credentials, and then redirect them to a
> different
> > > > server
> > > > > while passing the credentials at the same time so that they don't
> have
> > > to
> > > > > login again.
> > > > > > > > Specifically, I have two webservers in the same domain. When I
have
> a
> > > > user
> > > > > go to Webserver A (which uses basic authentication) I
> programmatically
> > > > > create either a user credential or impersonate a user context (for
> now
> > > > it's
> > > > > hardcoded, but in the future it would be entered in forms). Then,
I
> > > want
> > > > to
> > > > > let that user access a page on Webserver B (which uses basic
> > > > > authentication), but I don't want them to have to login again --
> > rather,
> > > I
> > > > > want to use the user context that I programmatically created on
> > > Webserver
> > > > A.
> > > > > > > > For instance, here is an example of the code I use to create the
> user
> > > > > credentials:
> > > > > > > > Dim strURI = "http://www.whatever.com"
> > > > > Dim myCred As New NetworkCredential("userid", "password",
> > "domain")
> > > > > Dim myURI As New Uri(strURI)
> > > > > Dim myCache As New CredentialCache
> > > > > myCache.Add(myURI, "Basic", myCred)
> > > > > > > > From this, I have attempted to use WebRequests and WebResponses to
> > > somehow
> > > > > allow me to direct the browser to a different page, and use the
> > > credential
> > > > I
> > > > > have generated. The most I can do, however, is create the request
> and
> > > > > receive the response:
> > > > > > > > Dim myWebRequest As System.Net.WebRequest =
> > > > > System.Net.WebRequest.Create(strURI)
> > > > > myWebRequest.Credentials = myCache
> > > > > Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
> > > > > > > > If only I could use the response.redirect method, and somehow pass
> the
> > > > > credentials with the redirection (like you can with the
webrequest),
> > it
> > > > > could work!
> > > > > > > > I have also attempted to use the LogonUser API (from the
> > advapi32.dll),
> > > > and
> > > > > impersonate a user based on the proper logon information -- this
> > works,
> > > > and
> > > > > I'm able to successfully impersonate the user, but again, I don't
> know
> > > how
> > > > > to pass along the user context to a different page.
> > > > > > > > I know that many people will say "just use form based
> authentication,"
> > > > but
> > > > > this will not work for me, as I want this to work with tools like
> > > Outlook
> > > > > Web Access, which requires windows authentication.
> > > > > > > > Any help would be greatly appreciated. Thank you!!
> > > > > > > > Wade
> > > > > > > > > > > >

Passport Implementation Problem.

I've installed passport sdk on to windows 2003 and I have received a
key from netservicesmanager.com. I have set securelevel in the
registry to 0. When I click on the link generated by logotag2 it takes
me to a page that displays

The .NET Passport service is currently unavailable at this Web site
for one of these reasons:

The site may contain an error or be experiencing a problem that
affects the .NET Passport service.
The .NET Passport service may be experiencing a temporary problem.
The site may not be an official .NET Passport-participating site.

Please return to this site later to try again.

I have set the site to preproduction and this is still not working.
Does anyone have something for me to try?

Thanks,
DanHi Dan,
I am also struggling with the exact problem as u r in. Were u able to solve
it. Please help me out.

Thanks
Ajoy

"Dan" wrote:

> I've installed passport sdk on to windows 2003 and I have received a
> key from netservicesmanager.com. I have set securelevel in the
> registry to 0. When I click on the link generated by logotag2 it takes
> me to a page that displays
> The .NET Passport service is currently unavailable at this Web site
> for one of these reasons:
> The site may contain an error or be experiencing a problem that
> affects the .NET Passport service.
> The .NET Passport service may be experiencing a temporary problem.
> The site may not be an official .NET Passport-participating site.
>
> Please return to this site later to try again.
>
> I have set the site to preproduction and this is still not working.
> Does anyone have something for me to try?
> Thanks,
> Dan
Hi,

I am facing exactly the same issue and would like to hear from you about the
solution. I have an urgent requirement and have to get the site up and
running ASAP. Pls pls help me. Any MVPs around?

"Ajoy" wrote:

> Hi Dan,
> I am also struggling with the exact problem as u r in. Were u able to solve
> it. Please help me out.
> Thanks
> Ajoy
> "Dan" wrote:
> > I've installed passport sdk on to windows 2003 and I have received a
> > key from netservicesmanager.com. I have set securelevel in the
> > registry to 0. When I click on the link generated by logotag2 it takes
> > me to a page that displays
> > The .NET Passport service is currently unavailable at this Web site
> > for one of these reasons:
> > The site may contain an error or be experiencing a problem that
> > affects the .NET Passport service.
> > The .NET Passport service may be experiencing a temporary problem.
> > The site may not be an official .NET Passport-participating site.
> > Please return to this site later to try again.
> > I have set the site to preproduction and this is still not working.
> > Does anyone have something for me to try?
> > Thanks,
> > Dan