Hi all,
We have developed a web application in ASP .NET (C#, .NET 2.0, IIS 6.0,
Windows Server 2003), with integrated Windows authentification, and
impersonation. I have tried to use memory streams, as opposed to
temporary files, as often as possible beacuse we want to spare our
client the pain of folder rights administration.
But our efforts proved worthless as we integrated Crystal Reports
(VS2005 edition) in our application : their framework relies on the
creation of such temporary files, in C:\WINDOWS\Temp and in
....\ASPNET\Local Settings\Temp (%TMP%, Crystal not always running under
impersonation).
To keep our goal, we managed to find what appears to be a good
solution, but about which we would like to get some feedback. In
Global.asax, we set :
void Application_Start(object sender, EventArgs e)
{
string tmpPath=HttpRuntime.CodegenDir;
WebUtilities.SetEnvironmentVariable("TMP", tmpPath);
WebUtilities.SetEnvironmentVariable("TEMP", tmpPath);
}
SetEnvironmentVariable is defined as :
public static class WebUtilities
{
[DllImport("kernel32.dll", EntryPoint="SetEnvironmentVariableW",
CharSet=CharSet.Unicode)]
public static extern bool SetEnvironmentVariable(string name,
string val);
}
Everything works fine, as far as we could test. Do you think we can
rely on this ?
Thanks in advance.
Mathieu CARTOIXA 1 2978
Mathieu Cartoixa a écrit :
Hi all,
We have developed a web application in ASP .NET (C#, .NET 2.0, IIS
6.0, Windows Server 2003), with integrated Windows authentification, and
impersonation. I have tried to use memory streams, as opposed to
temporary files, as often as possible beacuse we want to spare our
client the pain of folder rights administration.
But our efforts proved worthless as we integrated Crystal Reports
(VS2005 edition) in our application : their framework relies on the
creation of such temporary files, in C:\WINDOWS\Temp and in
...\ASPNET\Local Settings\Temp (%TMP%, Crystal not always running under
impersonation).
To keep our goal, we managed to find what appears to be a good
solution, but about which we would like to get some feedback. In
Global.asax, we set :
void Application_Start(object sender, EventArgs e)
{
string tmpPath=HttpRuntime.CodegenDir;
WebUtilities.SetEnvironmentVariable("TMP", tmpPath);
WebUtilities.SetEnvironmentVariable("TEMP", tmpPath);
}
SetEnvironmentVariable is defined as :
public static class WebUtilities
{
[DllImport("kernel32.dll", EntryPoint="SetEnvironmentVariableW",
CharSet=CharSet.Unicode)]
public static extern bool SetEnvironmentVariable(string name, string
val);
}
Everything works fine, as far as we could test. Do you think we can
rely on this ?
OK, it seems that at some point you cannot avoid a bit of
administration when impersonating, even for this directory, cf. http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
Mathieu CARTOIXA This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rick Strahl [MVP] |
last post by:
I'm having problems with installation of a Web app on my Win 2003 server.
I copy up the app configure the virtual. But when I access any ASPX pages I
now get:
CS0016: Could not write to output...
|
by: Chad Crowder |
last post by:
Hi all,
I hope someone can give me a hand, because I'm out of ideas. I keep getting
this message:
Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET...
|
by: Jon L. Lovesky |
last post by:
Hello all,
I am attempting to access a remote folder from an asp.net application (all
within the same domain). The application is configured for windows
authentication in IIS and the asp.net...
|
by: James |
last post by:
I am still having permission problems, but it has changed from a blanked
'Access Denied' error to this.
I have ensured ASPNET user has 'full control' of the Temporary ASP.NET Files
folder.
...
|
by: Roy |
last post by:
My dll file is copied to the
"%windir%\Microsoft.NET\Framework\{version}Temporary ASP.NET Files" folder
when I compile my asp.net project. When I run the application. The dll under
this folder is...
| |
by: Bas Hendriks |
last post by:
Has anyone any idea how asp.net find it's files back after compiling them to
the temporary asp.net directory?
I found on numerous webpages that the directorynames are chosen random but
cannot find...
|
by: Anbu |
last post by:
Hi all,
I have developed an application in VS .NET 2003 (framework 1.1) on a XP
platform. It is working fine in that PC.
Now, I setup new PC with same configuration for another develper....
|
by: Chris Newby |
last post by:
After googling this I got lots of information and tried a few different
things. However pages for a particular site are still consistantly failing
with "Access Denied to C:\ ... \Temporary Asp.Net...
|
by: daniel.navarro.murillo |
last post by:
Hi all,
I'm using Process.Start() to execute an application which receives a
file name as parameter. The file is stored into a network shared
folder and I need to specify user and password to...
|
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,...
|
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...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |