473,396 Members | 1,826 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,396 software developers and data experts.

ASP.NET Identity

CN
Platform: Windows 2000 Server, ASP.NET 1.1

I have changed the processModel's userName & password in
machine.config to use, let say, devUser, as ASP.NET identity,
according to article
http://msdn.microsoft.com/library/de...SecNetHT01.asp

In the file web.config of the application, I removed <identity.../>
and <authentication...> tags.

I'm able to look at (from the server)
http://hostname/appName/serviceName.asmx page, but from the service, I
failed to make connect to SQLServer.

I added 4 webmethods into the service:

[WebMethod]
public string GetDotNetThreadIdentity()
{
return Thread.CurrentPrincipal.Identity.Name;
}
[WebMethod]
public string GetWindowsThreadIdentity()
{
return WindowsIdentity.GetCurrent().Name;
}
[WebMethod]
public string GetUserIdentity()
{
return User.Identity.Name;
}
[WebMethod]
public string GetHttpContextUserIdentity()
{
return HttpContext.Current.User.Identity.Name;
}

Invoking GetDotNetThreadIdentity() yielded this:
<string xmlns="http://tempuri.org/" />

Invoking the other 3 yielded "page cannot be displayed".

Any idea how to get this going? Look like the worker threads run as
nobody or anonymous.

Thanks for your help!
Nov 18 '05 #1
2 1207
CN
Could anyone give a hint how to set this up? Thanks!

ro********@hotmail.com (CN) wrote in message news:<d3**************************@posting.google. com>...
Platform: Windows 2000 Server, ASP.NET 1.1

I have changed the processModel's userName & password in
machine.config to use, let say, devUser, as ASP.NET identity,
according to article
http://msdn.microsoft.com/library/de...SecNetHT01.asp

In the file web.config of the application, I removed <identity.../>
and <authentication...> tags.

I'm able to look at (from the server)
http://hostname/appName/serviceName.asmx page, but from the service, I
failed to make connect to SQLServer.

I added 4 webmethods into the service:

[WebMethod]
public string GetDotNetThreadIdentity()
{
return Thread.CurrentPrincipal.Identity.Name;
}
[WebMethod]
public string GetWindowsThreadIdentity()
{
return WindowsIdentity.GetCurrent().Name;
}
[WebMethod]
public string GetUserIdentity()
{
return User.Identity.Name;
}
[WebMethod]
public string GetHttpContextUserIdentity()
{
return HttpContext.Current.User.Identity.Name;
}

Invoking GetDotNetThreadIdentity() yielded this:
<string xmlns="http://tempuri.org/" />

Invoking the other 3 yielded "page cannot be displayed".

Any idea how to get this going? Look like the worker threads run as
nobody or anonymous.

Thanks for your help!

Nov 18 '05 #2
CN
Any help? Thanks!

ro********@hotmail.com (CN) wrote in message news:<d3*************************@posting.google.c om>...
Could anyone give a hint how to set this up? Thanks!

ro********@hotmail.com (CN) wrote in message news:<d3**************************@posting.google. com>...
Platform: Windows 2000 Server, ASP.NET 1.1

I have changed the processModel's userName & password in
machine.config to use, let say, devUser, as ASP.NET identity,
according to article
http://msdn.microsoft.com/library/de...SecNetHT01.asp

In the file web.config of the application, I removed <identity.../>
and <authentication...> tags.

I'm able to look at (from the server)
http://hostname/appName/serviceName.asmx page, but from the service, I
failed to make connect to SQLServer.

I added 4 webmethods into the service:

[WebMethod]
public string GetDotNetThreadIdentity()
{
return Thread.CurrentPrincipal.Identity.Name;
}
[WebMethod]
public string GetWindowsThreadIdentity()
{
return WindowsIdentity.GetCurrent().Name;
}
[WebMethod]
public string GetUserIdentity()
{
return User.Identity.Name;
}
[WebMethod]
public string GetHttpContextUserIdentity()
{
return HttpContext.Current.User.Identity.Name;
}

Invoking GetDotNetThreadIdentity() yielded this:
<string xmlns="http://tempuri.org/" />

Invoking the other 3 yielded "page cannot be displayed".

Any idea how to get this going? Look like the worker threads run as
nobody or anonymous.

Thanks for your help!

Nov 18 '05 #3

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

Similar topics

2
by: Edward | last post by:
SQL 7.0 I have a form in ASP.NET and I want to write the values to the SQL Server tables. The tables are Customer and Address tables. There will be an insert into the Customer table, and I...
5
by: DBA | last post by:
I have an identity field on a table in SQL Server. The identity seed is 1 and the identity increment is 1. If I remove a record from this table, the identity sequence is broken. For example: ...
5
by: grzes | last post by:
MS SQL Server 2000. My case is: I have the table T with primary key calling __recid int without identity property. This table includes a lot of records (about 1000000). I need to convert __recid's...
5
by: Eugene | last post by:
I have a table EugeneTest(id_num, fname, minit, lname) where field "id_num" is type IDENTITY and has UNIQUE constraint Let's say 2 user execute this code at the same time: DECLARE @return...
4
by: brent.ryan | last post by:
How do I get the next int value for a column before I do an insert in MY SQL Server 2000? I'm currently using Oracle sequence and doing something like: select seq.nextval from dual; Then I...
8
by: Razak | last post by:
Hi, I have a class which basically do Impersonation in my web application. From MS KB sample:- ++++++++++++++++++++code starts Dim impersonationContext As...
3
by: Dan | last post by:
I'm writing a record from an asp.net page to SQL Server. After the insert I'm selecting @@identity to return the ID of the record that I just wrote. It worked fine until I typed a semicolon into...
5
by: Veeru71 | last post by:
Given a table with an identity column (GENERATED BY DEFAULT AS IDENTITY), is there any way to get the last generated value by DB2 for the identity column? I can't use identity_val_local() as...
3
by: Rob | last post by:
Hi all, I have a bit of a complicated question, hope we have an SQL guru out there that can help us solve this killer problem. Due to the size of SQL Database we have (largest in the US), we...
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.