G
Guest
What I need - To retrieve the server name that the ASP application is running
on.
Why - Our current intranet is on a network where we have users that are on a
domain and some that are not. Using I.P. addresses all the users can access
the ASP pages. Using I.P. addresses, no one can use our .net pages because
the header that is passed back from the server has extra security that
require the end users to "log-in" to the server. This is caused by the .net
server thinking that the request is coming from outside of the domain because
an I.P. address is requesting information, thus it sends back to the client
the security header. When we change the I.P. addresses to the server name,
all the people on the domain can access our .net pages and ASP pages. The
personnel outside of the domain cannot access the .net pages, but can access
the ASP pages. So what we have done is made two default pages (default.asp
and default.aspx). All users are directed to the default.asp page, on this
page is a link for users to access the default.aspx pages for users that are
members of the domain. The link for the default.aspx page is hard-coded with
the server name. What we want to do is dynamically fill in the server name
for what ever server this is running on.
In short we have tried this, it works in our development environment because
the programmer has admin authority, but doesn't work on the production server.
<%
Set Loc = createobject("WBEMScripting.SWBEMLocator")
Set nms = Loc.ConnectServer()
WQL = "SELECT CSName FROM Win32_OperatingSystem"
Set cs = nms.ExecQuery(WQL, "WQL", 48)
For Each pc In cs
%>
<p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A
href="http://<%Response.Write pc.CSName%>/intranet/default.aspx"><b>DOMAIN
LINK</b> <--</p>
<p></p>
<%
Next
set cs = nothing: set nms = nothing: set loc = nothing
%>
We are getting this error;
SWbemLocator error '80041003'
Access denied
What is the correct way for us to retrieve the server name so that we can
dynamically fill in the hyperlink?
Thank you,
Lyners
on.
Why - Our current intranet is on a network where we have users that are on a
domain and some that are not. Using I.P. addresses all the users can access
the ASP pages. Using I.P. addresses, no one can use our .net pages because
the header that is passed back from the server has extra security that
require the end users to "log-in" to the server. This is caused by the .net
server thinking that the request is coming from outside of the domain because
an I.P. address is requesting information, thus it sends back to the client
the security header. When we change the I.P. addresses to the server name,
all the people on the domain can access our .net pages and ASP pages. The
personnel outside of the domain cannot access the .net pages, but can access
the ASP pages. So what we have done is made two default pages (default.asp
and default.aspx). All users are directed to the default.asp page, on this
page is a link for users to access the default.aspx pages for users that are
members of the domain. The link for the default.aspx page is hard-coded with
the server name. What we want to do is dynamically fill in the server name
for what ever server this is running on.
In short we have tried this, it works in our development environment because
the programmer has admin authority, but doesn't work on the production server.
<%
Set Loc = createobject("WBEMScripting.SWBEMLocator")
Set nms = Loc.ConnectServer()
WQL = "SELECT CSName FROM Win32_OperatingSystem"
Set cs = nms.ExecQuery(WQL, "WQL", 48)
For Each pc In cs
%>
<p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A
href="http://<%Response.Write pc.CSName%>/intranet/default.aspx"><b>DOMAIN
LINK</b> <--</p>
<p></p>
<%
Next
set cs = nothing: set nms = nothing: set loc = nothing
%>
We are getting this error;
SWbemLocator error '80041003'
Access denied
What is the correct way for us to retrieve the server name so that we can
dynamically fill in the hyperlink?
Thank you,
Lyners