Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Saturday, March 24, 2012

Permission to access PDF files from ASP.NET

Hi All,

My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.

Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open when
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks

You want to open a PDF on the *server*??

Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.

If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();

--
Hans Kesting

Permission to access PDF files from ASP.NET

Hi All,
My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.
Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open whe
n
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks
>
You want to open a PDF on the *server*'
Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.
If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();
Hans Kesting

permissions

I just moved my old server to a new and in the process upgraded from win2k to win2k3. The problem is whenever users try to run a page that processes a file (creates a thumbnail) the permission is denied.

I have given

ASP.NET MACHINE ACCOUNT and
INTERNET GUEST ACCOUNT

MODIFY
READ AND EXECUTE
LIST FOLDER CONTENTS
READ
WRITE

However, still no luck. Is this a security risk giving these permissions to these accounts? And what do I have to do to get it working!?. Is this because security on win2k3 is tighter? I swear it worked like a charm on win2k

Any help greatly appreciated.

Thanks

Mike123

(Error Below)

Exception Details: System.UnauthorizedAccessException: Access to the path "e:\web\pics\uploads\bob07.jpg" is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired accessso you've made the changes to permisions where? IIS console? You'll also need to alter the NTFS ACLs trhough windows explorer's 'security' pane (under the properties window)
I did that as well , but no luck =[

am i setting the wrong accounts??
Any luck since Mike?

Matt.
Yes I got it.

I believe it was the NT Services account that did not have permission that needed it.
Are you talking about the Windows NT Services, as in the modules which perform functions for Windows NT, or an actual account which I don't appear to have on my system? Where would I look for this?

More importantly, what did you do exactly to get it working?

Thanks muchly,
Matt.
Dont quote me on this but as I remember it an actual account. 2k3 is setup a bit differently. All I did was give this account permissions and it worked.

Wednesday, March 21, 2012

Per-session memory consumption in ASP.NET worker process

Hello,

Is there any way to find out how much memory each web session is
consuming within the ASP.NET worker process (aspnet_wp.exe)? Further,
is it possible to find how much memory is consumed by session
variables alone?

- Jim CampbellJim Campbell wrote:

> Hello,
> Is there any way to find out how much memory each web session is
> consuming within the ASP.NET worker process (aspnet_wp.exe)? Further,
> is it possible to find how much memory is consumed by session
> variables alone?
> - Jim Campbell
hi Jim,

one way to accomplish this can be
to do some production debugging and get the memory dump of aspnet_wp to
look at the number of session variables in the worker process..
following link can get you started

http://msdn.microsoft.com/library/d...tml/DBGch01.asp

there might certainly be simpler ways to do this, but this is one way to
accomplish this ..