Ask a Question related to ASP.NET Security, Design and Development.
-
Bo Campbell via .NET 247 #1
Trouble setting security for new thread in web app.
Hello,
I have a web app that is being used to restore sql databases. Iam using a new thread to do the sql restores so I can keep theweb page from timing out (it checks a database to see thestatus, etc.) My problem is that I have tried just abouteverything to give that thread the domain username and passwordthat is setup for it on the network. As soon as the threadstarts, it goes straight to the machine name for the login.
I have read things that are very close to what I need on here butnothing that really pinpoints it. I thought about making thefunction into a service but feel i'm very close. Here is my codewhere I call the thread:
tDBRestore = New Thread(AddressOf RestoreDB)
tDBRestore.Name = "tRestoreDB"
tDBRestore.Start()
.NET is impersonating the logged in user, which is great, untilit hits the new thread.
Thanks,
Bo
--------------------------------
From: Bo Campbell
-----------------------
Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
<Id>L3FjwIaSUEGkXsto7LXw/Q==</Id>
Bo Campbell via .NET 247 Guest
-
Can't get the security setting i need
Why can't I create a security setting that creates a password to open an attachment as well as a permissions password that does not allow printing or... -
setting security
Hi all gurus, it's the very 1st time I attempt to build a Web Service app, and while simple samples work fine, I stuck trying to fill (on server... -
Need help. Having trouble with security on my web service.
I am getting an access denied 403 error when I try to access my web service. My IIS setting is set to use only Windows Authentication. The client... -
Trouble setting inch marks in text – Iluustrator CS
Our agency has had trouble having inch marks show up in text (versus quote marks) in Illustrator CS. We have turned the smart quote feature on and... -
Trouble setting the web.config to use my class
Hey Everyone, I am building a store application that is on an unsecured server. We got one of those shared certificates that takes you from (ex.... -
Hernan de Lahitte #2
Re: Trouble setting security for new thread in web app.
Unfortunately v1.1 does not transmit the security context (i.e. , principal,
thread token, etc) to the newly created thread. If you don't want to use a
thread from the .NET thread pool (as I guess is your scenario), you would
have to pass the security context (principal object might be suffice) to
your callback method like any other parameter that might receive your
method. On your callback method, you may impersonate with
yourprincipal.Identity.Impresonate() (and don't forget to "Undo" on your
finally section) or just attach this principal to the thread's principal
with Thread.CurrentPrincipal = yourprincipal.
--
Hernan de Lahitte
Lagash Systems S.A.
[url]http://weblogs.asp.net/hernandl[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bo Campbell via .NET 247" <anonymous@dotnet247.com> wrote in message
news:ui9k9FieEHA.732@tk2msftngp13.phx.gbl...
Hello,
I have a web app that is being used to restore sql databases. I am using a
new thread to do the sql restores so I can keep the web page from timing out
(it checks a database to see the status, etc.) My problem is that I have
tried just about everything to give that thread the domain username and
password that is setup for it on the network. As soon as the thread starts,
it goes straight to the machine name for the login.
I have read things that are very close to what I need on here but nothing
that really pinpoints it. I thought about making the function into a service
but feel i'm very close. Here is my code where I call the thread:
tDBRestore = New Thread(AddressOf RestoreDB)
tDBRestore.Name = "tRestoreDB"
tDBRestore.Start()
..NET is impersonating the logged in user, which is great, until it hits the
new thread.
Thanks,
Bo
--------------------------------
From: Bo Campbell
-----------------------
Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
<Id>L3FjwIaSUEGkXsto7LXw/Q==</Id>
Hernan de Lahitte Guest



Reply With Quote

