473,402 Members | 2,072 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,402 software developers and data experts.

access is denied ???

Dear ASP.NET Programmers,

I am trying to save a new created Word document, but getting the following
the error. I granted the necessary rights to the ASPNET user, but I'm still
getting this error.
Thanks in advance,

Buran

Dim objWordApp As New Microsoft.Office.Interop.Word.Application()
Dim newDoc As New Microsoft.Office.Interop.Word.Document()

newDoc = objWordApp.Documents.Add()
newDoc.SaveAs("burak1.doc")

Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access 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 access.
Nov 17 '05 #1
3 2517
Thank you, but could you help me further?

Buran
"Sean" <Sh******@hotmail.com> wrote in message
news:eV*************@tk2msftngp13.phx.gbl...
your error is not on saving the doc but accessing ther resource object to
msword... probibly is being denied access to the location of the object...
try creating a referece to it 1st so that on compile time your program saves a copy of the referenced interop object in it's own Bin directory.
"buran" <bu***@buran.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
Dear ASP.NET Programmers,

I am trying to save a new created Word document, but getting the following the error. I granted the necessary rights to the ASPNET user, but I'm

still
getting this error.
Thanks in advance,

Buran

Dim objWordApp As New Microsoft.Office.Interop.Word.Application()
Dim newDoc As New Microsoft.Office.Interop.Word.Document()

newDoc = objWordApp.Documents.Add()
newDoc.SaveAs("burak1.doc")

Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access 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 access.


Nov 17 '05 #2
How can I accomplish this?

try creating a referece to it 1st so that on compile time your program
saves
a copy of the referenced interop object in it's own Bin directory.
Thank you

"Sean" <Sh******@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Sure...

How?

"buran" <bu***@buran.com> wrote in message
news:OC**************@TK2MSFTNGP09.phx.gbl...
Thank you, but could you help me further?

Buran
"Sean" <Sh******@hotmail.com> wrote in message
news:eV*************@tk2msftngp13.phx.gbl...
your error is not on saving the doc but accessing ther resource object to msword... probibly is being denied access to the location of the object...

try creating a referece to it 1st so that on compile time your program

saves
a copy of the referenced interop object in it's own Bin directory.
"buran" <bu***@buran.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
> Dear ASP.NET Programmers,
>
> I am trying to save a new created Word document, but getting the

following
> the error. I granted the necessary rights to the ASPNET user, but
I'm still
> getting this error.
> Thanks in advance,
>
> Buran
>
> Dim objWordApp As New Microsoft.Office.Interop.Word.Application() > Dim newDoc As New Microsoft.Office.Interop.Word.Document()
>
> newDoc = objWordApp.Documents.Add()
> newDoc.SaveAs("burak1.doc")
>
> Access is denied.
> Description: An unhandled exception occurred during the execution of

the > current web request. Please review the stack trace for more information > about the error and where it originated in the code.
>
> Exception Details: System.UnauthorizedAccessException: Access 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 access.
>
>



Nov 17 '05 #3
How can I accomplish this?

try creating a referece to it 1st so that on compile time your program
saves
a copy of the referenced interop object in it's own Bin directory.
Thank you

"Sean" <Sh******@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Sure...

How?

"buran" <bu***@buran.com> wrote in message
news:OC**************@TK2MSFTNGP09.phx.gbl...
Thank you, but could you help me further?

Buran
"Sean" <Sh******@hotmail.com> wrote in message
news:eV*************@tk2msftngp13.phx.gbl...
your error is not on saving the doc but accessing ther resource object to msword... probibly is being denied access to the location of the object...

try creating a referece to it 1st so that on compile time your program

saves
a copy of the referenced interop object in it's own Bin directory.
"buran" <bu***@buran.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
> Dear ASP.NET Programmers,
>
> I am trying to save a new created Word document, but getting the

following
> the error. I granted the necessary rights to the ASPNET user, but
I'm still
> getting this error.
> Thanks in advance,
>
> Buran
>
> Dim objWordApp As New Microsoft.Office.Interop.Word.Application() > Dim newDoc As New Microsoft.Office.Interop.Word.Document()
>
> newDoc = objWordApp.Documents.Add()
> newDoc.SaveAs("burak1.doc")
>
> Access is denied.
> Description: An unhandled exception occurred during the execution of

the > current web request. Please review the stack trace for more information > about the error and where it originated in the code.
>
> Exception Details: System.UnauthorizedAccessException: Access 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 access.
>
>



Nov 17 '05 #4

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

Similar topics

2
by: calfdog | last post by:
Hello, Does anyone know a workaround for calling fireEvent. With the latest from Microsoft OS XP2 and Hot fixes to IE it now gives an "access denied" error in Python when called. Here is what...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
16
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
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...
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,...
0
isladogs
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 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.