Hi there,

I have a simple HTML page.

I would like to create a hyperlink on it that points to the logon user's
home directory on a known server. For example:

<A HREF = "http://[Server name]/[Logon User name]/Info.html">Your info
here</A>

Basically I would like to construct the hyperlink on the fly. BTW, the
server name is known and it will be the same for all users.

Do you know if I can do that on a HTML page with VBScript?

Thanks.

Abel Chan

RE: Build a hyperlink with user logon name in it by v-schang

v-schang
Wed Apr 06 00:38:37 CDT 2005

Hi Abel,

Welcome to MSDN newsgroup.
From your description, you're wondering whether we can dynamicaly populate
a hyperlink which can embeded the current logon user's name(retrieved by
clientside vbscript) into the "href" url of the link and so that the user
can redirect to the virtual folder specified by the uesrname, yes?

As for this problem, If the "Logon user" you mentioned is the authenticated
user thourgh IIS's authentication(such as basic or integrated windows),
then I'm afraid the only means to retrieve this info is using serverside
script or serivce , such as ASP or ASP.NET. Pure clientside script is dumb
for retrieving serverside context info. Is it possible that your html page
be converted to an ASP.NET (or asp if you haven't .net environment
installed) page ?

Please feel free to provide further info or questions on your problem so
that we can try doing some further research.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



RE: Build a hyperlink with user logon name in it by awong

awong
Wed Apr 06 12:31:12 CDT 2005

Hi Steven,

Thanks to your quick response.
Yes, you are exactly correct on what I tried to accomplish. :)
I can convert it to ASP.NET.
The current html pages are created by FrontPage 2003.
Is there a wizard on VS.NET or a tool to load the FrontPage 2003 html
project and convert it to ASP.NET project?
The gentlemen who created the FrontPage project would like to continue using
FrontPage to update the page contents. What would happen if he loads the
ASP.NET pages into FrontPage? Any issue that he needs to know? Any KB
document explains this?

Thanks Steven.

Abel Chan

"Steven Cheng[MSFT]" wrote:

> Hi Abel,
>
> Welcome to MSDN newsgroup.
> From your description, you're wondering whether we can dynamicaly populate
> a hyperlink which can embeded the current logon user's name(retrieved by
> clientside vbscript) into the "href" url of the link and so that the user
> can redirect to the virtual folder specified by the uesrname, yes?
>
> As for this problem, If the "Logon user" you mentioned is the authenticated
> user thourgh IIS's authentication(such as basic or integrated windows),
> then I'm afraid the only means to retrieve this info is using serverside
> script or serivce , such as ASP or ASP.NET. Pure clientside script is dumb
> for retrieving serverside context info. Is it possible that your html page
> be converted to an ASP.NET (or asp if you haven't .net environment
> installed) page ?
>
> Please feel free to provide further info or questions on your problem so
> that we can try doing some further research.
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>

RE: Build a hyperlink with user logon name in it by v-schang

v-schang
Wed Apr 06 22:44:43 CDT 2005

Thanks for your response Abel,

If using ASP.NET/ASP is ok, I think the problem is easy to resolve. As for
editing FontPage created Page in VS.NET, that's not the problem. VS.NET has
its own html editor for editing html pages. However, I recommend that you
finish all your page's UI work in FrontPage before loading it in VS.NET to
convert to asp.net page since the VS.NET is a developer tool and its html
editor is not so perfect as those WYSIWYG web page tools (FrontPage or
DreamWeaver)

As for getting the logon user in asp/asp.net , we can just use the
Request.ServerVariables collection to retrieve the
AUTH_USER item which represent the current authenticated user( in IIS). See
the following article:

# IIS Server Variables
http://msdn.microsoft.com/library/en-us/iissdk/html/21b3be8f-d4ed-4059-8e21-
6cba2c253006.asp?frame=true

Also, if you just need only one dynamic page and only with a little code
logic, then I still recommend that you use a simple ASP page which is much
simpler than asp.net and that can avoid your server installing the .net
framework.

Anyway, please let me know your opinion and consideration. If you need some
detailed code, I can provide you a simple asp or asp.net page that retrieve
the IIS passed authenticated user's username.

Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




RE: Build a hyperlink with user logon name in it by awong

awong
Thu Apr 07 13:51:03 CDT 2005

Hi Steven,

Thanks to your detail email. Since the server has .NET framework installed,
I will go for ASP.NET. I think I can find some sample from Google of how to
do that.

BTW, does VS.NET have a Wizard to convert my html pages to ASP.NET? Just
curious. :)

Thanks again.

Abel

"Steven Cheng[MSFT]" wrote:

> Thanks for your response Abel,
>
> If using ASP.NET/ASP is ok, I think the problem is easy to resolve. As for
> editing FontPage created Page in VS.NET, that's not the problem. VS.NET has
> its own html editor for editing html pages. However, I recommend that you
> finish all your page's UI work in FrontPage before loading it in VS.NET to
> convert to asp.net page since the VS.NET is a developer tool and its html
> editor is not so perfect as those WYSIWYG web page tools (FrontPage or
> DreamWeaver)
>
> As for getting the logon user in asp/asp.net , we can just use the
> Request.ServerVariables collection to retrieve the
> AUTH_USER item which represent the current authenticated user( in IIS). See
> the following article:
>
> # IIS Server Variables
> http://msdn.microsoft.com/library/en-us/iissdk/html/21b3be8f-d4ed-4059-8e21-
> 6cba2c253006.asp?frame=true
>
> Also, if you just need only one dynamic page and only with a little code
> logic, then I still recommend that you use a simple ASP page which is much
> simpler than asp.net and that can avoid your server installing the .net
> framework.
>
> Anyway, please let me know your opinion and consideration. If you need some
> detailed code, I can provide you a simple asp or asp.net page that retrieve
> the IIS passed authenticated user's username.
>
> Thanks,
>
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>

RE: Build a hyperlink with user logon name in it by v-schang

v-schang
Thu Apr 07 20:30:42 CDT 2005

Hi Abel,

Has your dreamweaver generated html pages contains any dynamic
code(codefusion?), if its just normal html page, then VS.NET can directly
load into web project. And to convert it to ASP.NET page, we may need to
add some particuloar tags and directives into the page. Also, we need to
attache serverside code for webform page. Below is the MSDN reference on
migrating from different pages to asp.net webform page. I think have a
general idea of how the asp.net webform page design and works may help your
convertion task:

#Migrating to Web Forms
http://msdn.microsoft.com/library/en-us/vbcon/html/vborimigratingtowebforms.
asp?frame=true

If anything else I can help, please feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





RE: Build a hyperlink with user logon name in it by awong

awong
Thu Apr 07 23:43:01 CDT 2005

Hi Steven,

We don't have any dynamic code on the html page. It is just normal html
page.

Great! I will take a look at the link below and go from there.

Thanks so much for your professional help. You guys are awesome! :)

Best Regards,

Abel Chan

"Steven Cheng[MSFT]" wrote:

> Hi Abel,
>
> Has your dreamweaver generated html pages contains any dynamic
> code(codefusion?), if its just normal html page, then VS.NET can directly
> load into web project. And to convert it to ASP.NET page, we may need to
> add some particuloar tags and directives into the page. Also, we need to
> attache serverside code for webform page. Below is the MSDN reference on
> migrating from different pages to asp.net webform page. I think have a
> general idea of how the asp.net webform page design and works may help your
> convertion task:
>
> #Migrating to Web Forms
> http://msdn.microsoft.com/library/en-us/vbcon/html/vborimigratingtowebforms.
> asp?frame=true
>
> If anything else I can help, please feel free to post here. Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
>

RE: Build a hyperlink with user logon name in it by v-schang

v-schang
Fri Apr 08 00:21:50 CDT 2005

You're welcome Abel,

Good Luck! :--)

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)