Hello All,
I've recently started
with the integration of CuteMessenger in our site which requires
impersonation because this is how the database is accessed.
The
scenario is the following:
1) there is not specific account
defined in web.config for impersonation;
2) after the user logs in
he/she is authenticated and its identity is stored in the session;
3)
all subsequent requests are first impersonated (using the identity in
the session) and then processed;
I've created the Cute
database tables in the existing database that requires trusted
connections (that's why impersonation is needed) and implemented a
specific connection string provider. Before the connection string is
returned I am doing the impersonation and this works fine. My first
question is: is there a better place to do the impersonation of the
request?
After this it seems (I cannot debug as there is not
source code of the Cute dlls) that a web service is used to do
something. At this point I am getting an error that some classes
cannot be found in C:\Windows\TEMP. The exact error is:
error CS2001: Source file
'C:\WINDOWS\TEMP\2885569c\9y51fg4p.0.cs' could not be found
I checked with Google and it
seems that the problem is related to access permissions to the folder
- the temporary classes cannot be created. Then I've allowed everyone
to write in this temp folder and the problem disappeared; however
this is not a good from point of security.
Can you tell me how
to impersonate also the request to/from the web service?
greetings
and thanks in advance
Diman