I don't know, but adding "MACHINENAME\ASPNET" account to the MS Office
directory with
execute permission may help.
Users can't create process from files in a directory if they do not have
execute permission of the
directory.
"hari krishna" <harikrishna@discussions.microsoft.com> 在郵件
news:1E0F7F54-6C07-4839-9ADC-1427A9D81F69@microsoft.com 中撰寫...[color=blue]
> HI Shamshad,
> Thanks for the advise.
> I need ur help in this regard.
> I don't want to open the xl in browser, and it should not ask for the[/color]
name[color=blue]
> of the file to save?open etc.. it should automatically generate the xl[/color]
file[color=blue]
> and store it to the physical folder dynamically. This is our users[/color]
request.[color=blue]
> my web server is on Win 2000 server machine and IIS 5.0, ASP.NET 1.1
> installed.
> the code i wrote is giving permissions problem. I did give Launch and[/color]
Access[color=blue]
> permissions through DCOMCNFG for MSExcel application. But still it denied[/color]
the[color=blue]
> permissions. At the line "Dim oExcel As Excel.Application = New
> Excel.Application", it gave the following error. pls help me how to do[/color]
this.[color=blue]
> Access is denied.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information[/color]
about[color=blue]
> 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[/color]
or[color=blue]
> 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[/color]
boxes[color=blue]
> for the desired access.
>
> Source Error:
>
> Line 28: Private Sub Page_Load(ByVal sender As System.Object, ByVal e[/color]
As[color=blue]
> System.EventArgs) Handles MyBase.Load
> Line 29:
> Line 30: Dim oExcel As Excel.Application = New Excel.Application
> Line 31:
> Line 32: Dim oBooks As Excel.Workbooks, oBook As Excel.Workbook
>
>
> Source File: E:\Inetpub\wwwroot\WebApplication1\WebForm3.aspx.v b Line:[/color]
30[color=blue]
>
> Stack Trace:
>
>
> [UnauthorizedAccessException: Access is denied.]
> WebApplication1.WebForm3.Page_Load(Object sender, EventArgs e) in
> E:\Inetpub\wwwroot\WebApplication1\WebForm3.aspx.v b:30
> System.Web.UI.Control.OnLoad(EventArgs e)
> System.Web.UI.Control.LoadRecursive()
> System.Web.UI.Page.ProcessRequestMain()
>
>
>
>
>
>
>
>
> "Lau Lei Cheong" wrote:
>[color=green]
> > I've heard that new version of CrystalReport(10?) have this
> > function(generate PDF format report), but not verified yet.
> >
> > Maybe you can take a look on that...
> >
> > "Shamshad" <shamshad_ali74@hotmail.com> |b?l¥o
> > news:OICDMiInEHA.2612@TK2MSFTNGP15.phx.gbl ?????g...[color=darkred]
> > > If u don't install Excel library on ur Server how ur vb code will[/color][/color][/color]
create[color=blue][color=green][color=darkred]
> > > object for Excel files? I had done this on IIS 5.0 with office[/color][/color][/color]
installed[color=blue][color=green]
> > on[color=darkred]
> > > server and I code that all upon users request from website. It does
> > > automatically and make attachment and send email to waterver user[/color][/color][/color]
input[color=blue][color=green][color=darkred]
> > > email address. It makes a temp folder and create .xls file and attach[/color][/color][/color]
for[color=blue][color=green][color=darkred]
> > > email and delete it. That is not a good practice but we do for users
> > > request.
> > > I also want to conevert it for PDF, any one has idea how to make[/color][/color][/color]
dynamic[color=blue][color=green]
> > PDF[color=darkred]
> > > upon users given criteria on web and send that report as email[/color][/color][/color]
attachment[color=blue][color=green]
> > in[color=darkred]
> > > PDF format?
> > > Let's discuss more if any one had done. Hari if u need any furhter
> > > assistance let me know.
> > > Shamshad Ali.
> > > "hari krishna" <harikrishna@discussions.microsoft.com> wrote in[/color][/color][/color]
message[color=blue][color=green][color=darkred]
> > > news:CFF07264-8DF0-4B4A-8405-11D1866BEDA5@microsoft.com...
> > > > hi srini thanks,
> > > > But i want a code in vb code.
> > > > And also i gave permissions through dcomconfig to launch[/color][/color][/color]
permissions ,[color=blue][color=green][color=darkred]
> > > > access permissions to excel application. but it did not work through
> > > asp.net.
> > > > it still gave permissions denied.
> > > > and more over i know that excel is not recommended for automation[/color]
> > through[color=darkred]
> > > > server side. that is why i don't want to install xl, and create[/color][/color][/color]
reports[color=blue][color=green][color=darkred]
> > > with
> > > > .xls extension and when i open it on a machine where xl is installed[/color][/color][/color]
it[color=blue][color=green][color=darkred]
> > > > should open in xl.
> > > > Is there any code using response object sending to xl like that.
> > > > pls reply.
> > > >
> > > > "srini" wrote:
> > > >
> > > > > hi hari,
> > > > > Please go thru this article before getting into coding.
> > > > >
http://support.microsoft.com/default.aspx?kbid=257757
> > > > > MS does not recommend server side automation of office.
> > > > > And for writing to Excel the following link helps :)
> > > > >
http://www.eggheadcafe.com/articles/20021012.asp
> > > > >
> > > > > the best
> > > > > srini
> > > > >
> > > > > "hari krishna" wrote:
> > > > >
> > > > > > hi,
> > > > > > I want to send the data from dataset information to Excel[/color][/color][/color]
through[color=blue][color=green][color=darkred]
> > > ASP.Net.
> > > > > > there will be no XL installed on web server. web server is win[/color][/color][/color]
2000[color=blue][color=green][color=darkred]
> > > server
> > > > > > machine. I am using visual basic code in asp.net.
> > > > > > The Xl sheet should not be opened in the browser. All the[/color]
> > information[color=darkred]
> > > from
> > > > > > dataset(datatable,datarows) should be sent to XL and the file[/color][/color][/color]
name[color=blue][color=green][color=darkred]
> > > should be
> > > > > > given dynamically through program and the xl file should be[/color][/color][/color]
saved[color=blue][color=green][color=darkred]
> > > dynamically
> > > > > > through program. it should not ask for file name and it should[/color][/color][/color]
not[color=blue][color=green]
> > ask[color=darkred]
> > > to
> > > > > > save.
> > > > > > Kindly let me know if any body has done this or any body knows[/color][/color][/color]
how[color=blue][color=green]
> > to[color=darkred]
> > > do.
> > > > > > pls send me the code to
vhari_krishna@rediffmail.com
> > > > > >
> > > > > > regards,
> > > > > > Hari,
> > > > > >
vhari_krishna@rediffmail.com.
> > > > > >
> > > > > >
> > >
> > >[/color]
> >
> >
> >[/color][/color]