-
ASP.NET can't do what Windows Forms can do ..
I have basically created a C# class library, which is a wrapper to COM.Interop
calls to Excel.exe.
When i reference this DLL from a Windows Application, I can quite happily
call all the functions.
However, if reference this DLL from a ASP.NET web page, using exactly the
same code, all I get is "Server Execution Failed" ...
I suspect that I am doing something wrong. If anyone can throw any light
on the problem, I woud be very grateful.
-
Re: ASP.NET can't do what Windows Forms can do ..
MikeW <mkwarby@hotmail.com> wrote:
>
> I have basically created a C# class library, which is a wrapper to COM.Interop
> calls to Excel.exe.
>
> When i reference this DLL from a Windows Application, I can quite happily
> call all the functions.
>
> However, if reference this DLL from a ASP.NET web page, using exactly the
> same code, all I get is "Server Execution Failed" ...
>
> I suspect that I am doing something wrong. If anyone can throw any light
> on the problem, I woud be very grateful.
Do other ASP.NET applications (which don't reference the DLL) work for
you? If no ASP.NET apps work, you've probably got IIS configuration
problems.
If other ASP.NET applications work fine, it's almost certainly a
permissions issue. ASP.NET apps run as the asp_net user by default,
which is a user with very few rights; you may have to give asp_net more
rights or change the user ASP.NET runs as.
--
Dave Rothgery
Picking nits since 1976
drothgery@alum.wpi.edu
http://drothgery.editthispage.com
-
Re: ASP.NET can't do what Windows Forms can do ..
Thank you for your reply.
Unfortunately, this is the only ASP.NET app that doesn't work. I have looked
at rights issues, and even giving ASPNet user admin rights does not help.
Someone else also suggested I try using the ASPCompat=true attribute, but
this did not bear any fruit either.
I do not know much about it, but I think it may be something to do with the
way ASp.NET framework deals with Interop calls. If anyone knows more about
this, perhaps they might have an idea. Once again, all help is appreciated.
David A. Rothgery <drothgery@alum.wpi.edu> wrote:
>MikeW <mkwarby@hotmail.com> wrote:
>>
>> I have basically created a C# class library, which is a wrapper to COM.Interop
>> calls to Excel.exe.
>>
>> When i reference this DLL from a Windows Application, I can quite happily
>> call all the functions.
>>
>> However, if reference this DLL from a ASP.NET web page, using exactly
the
>> same code, all I get is "Server Execution Failed" ...
>>
>> I suspect that I am doing something wrong. If anyone can throw any light
>> on the problem, I woud be very grateful.
>
>Do other ASP.NET applications (which don't reference the DLL) work for
>you? If no ASP.NET apps work, you've probably got IIS configuration
>problems.
>
>If other ASP.NET applications work fine, it's almost certainly a
>permissions issue. ASP.NET apps run as the asp_net user by default,
>which is a user with very few rights; you may have to give asp_net more
>rights or change the user ASP.NET runs as.
>
>--
>Dave Rothgery
>Picking nits since 1976
>drothgery@alum.wpi.edu
>http://drothgery.editthispage.com
-
Re: ASP.NET can't do what Windows Forms can do ..
Try adding the following to your web.config file.
<authentication mode="Windows"/>
<identity impersonate="true" />
This is what I had to do to get Excel to open on the server side of my web
application. (Thanks Tom Barnaby!)
Note, this was done for an Intranet site.
Calvin...
"MikeW" <mkwarby@hotmail.com> wrote:
>
>Thank you for your reply.
>
>Unfortunately, this is the only ASP.NET app that doesn't work. I have looked
>at rights issues, and even giving ASPNet user admin rights does not help.
> Someone else also suggested I try using the ASPCompat=true attribute, but
>this did not bear any fruit either.
>
>I do not know much about it, but I think it may be something to do with
the
>way ASp.NET framework deals with Interop calls. If anyone knows more about
>this, perhaps they might have an idea. Once again, all help is appreciated.
>
>
>
>
>David A. Rothgery <drothgery@alum.wpi.edu> wrote:
>>MikeW <mkwarby@hotmail.com> wrote:
>>>
>>> I have basically created a C# class library, which is a wrapper to COM.Interop
>>> calls to Excel.exe.
>>>
>>> When i reference this DLL from a Windows Application, I can quite happily
>>> call all the functions.
>>>
>>> However, if reference this DLL from a ASP.NET web page, using exactly
>the
>>> same code, all I get is "Server Execution Failed" ...
>>>
>>> I suspect that I am doing something wrong. If anyone can throw any light
>>> on the problem, I woud be very grateful.
>>
>>Do other ASP.NET applications (which don't reference the DLL) work for
>>you? If no ASP.NET apps work, you've probably got IIS configuration
>>problems.
>>
>>If other ASP.NET applications work fine, it's almost certainly a
>>permissions issue. ASP.NET apps run as the asp_net user by default,
>>which is a user with very few rights; you may have to give asp_net more
>
>>rights or change the user ASP.NET runs as.
>>
>>--
>>Dave Rothgery
>>Picking nits since 1976
>>drothgery@alum.wpi.edu
>>http://drothgery.editthispage.com
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks