Thursday, March 29, 2012
Office 2007 documents not appearing in iframe
office/pdf etc documents within an iframe in a web browser.
However, since installing office 2007 this has stopped working and instead
of them appearing nicely in the iframe they now pop up and appear within the
office program.
Does anyone know if there is a way to alter the behaviour of office 2007 so
that the documents remain embedded within the iframe, or is this something
which I just have to accept.
ThanksAFAIK in both 2007 and previous version this is actually a client dependant
behavior. Try :
http://support.microsoft.com/kb/162059/en-us
Another option could be to use an object tag (not tried)...
Patrice
"T" <T@.discussions.microsoft.com> a crit dans le message de news:
49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
> We've been developing an application for a while which allows display of
> office/pdf etc documents within an iframe in a web browser.
> However, since installing office 2007 this has stopped working and instead
> of them appearing nicely in the iframe they now pop up and appear within
> the
> office program.
> Does anyone know if there is a way to alter the behaviour of office 2007
> so
> that the documents remain embedded within the iframe, or is this something
> which I just have to accept.
> Thanks
>
Hey thanks. I did as suggested in the support article and it does now open i
n
the iframe.
However, this must have been something the Office 2007 installation messed
around with as everything worked fine before installing 2007. Anyone know wh
y
this was done? Also its not something i can expect all our users to do after
they install office 2007, that they then have to for every office file type
select a check box in folder options to allow them to appear in the browser.
Does anyone have any suggestions?
Cheers
"Patrice" wrote:
> AFAIK in both 2007 and previous version this is actually a client dependan
t
> behavior. Try :
> http://support.microsoft.com/kb/162059/en-us
> Another option could be to use an object tag (not tried)...
> --
> Patrice
>
> "T" <T@.discussions.microsoft.com> a écrit dans le message de news:
> 49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
>
>
re:
!> http://support.microsoft.com/kb/162059/en-us
That KB needs revision.
The latest document type listed is Office 8.
Office 2007 is Office 12.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Patrice" <http://www.chez.com/scribe/> wrote in message
news:OKO8sV9XHHA.4552@.TK2MSFTNGP05.phx.gbl...
> AFAIK in both 2007 and previous version this is actually a client dependan
t behavior. Try :
> http://support.microsoft.com/kb/162059/en-us
> Another option could be to use an object tag (not tried)...
> --
> Patrice
>
> "T" <T@.discussions.microsoft.com> a crit dans le message de news:
> 49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
>
I mentionned you could perhaps use an object tag inside your iframe to see
if the document is then forced to be placed inside the IE window...
"T" <T@.discussions.microsoft.com> a crit dans le message de news:
AA9DF605-996F-457E-95C0-A9FE2983D49D@.microsoft.com...
> Hey thanks. I did as suggested in the support article and it does now open
> in
> the iframe.
> However, this must have been something the Office 2007 installation messed
> around with as everything worked fine before installing 2007. Anyone know
> why
> this was done? Also its not something i can expect all our users to do
> after
> they install office 2007, that they then have to for every office file
> type
> select a check box in folder options to allow them to appear in the
> browser.
> Does anyone have any suggestions?
> Cheers
>
> "Patrice" wrote:
>
Office 2007 documents to database, dynamically generate on demand
Hello, I am currently adding some document management functionality to a .Net 2.0 Web app (VB) where I take a file in, save the file to a SQL 2000 database (image datatype), and then allow users to browse and download these files.
This works great for most files my users use -- with the exception of Office 2k7 files
I am able to upload a file, read the file into a binary array and insert into a new record in the database.
However, when I retrieve the binary array and attempt to output the file, there is a problem.
The user is prompted to open or save the file per-usual, however when Word 2007 tries to open the file, there is an error message that says:
"The Office Open XML file Test.docx cannot be opened because there are problems with the contents"
Under "Details" it says:
"The file is corrupt and cannot be opened"
If I click "OK", I am asked whether I want to have Word recover the contents of the document.
If I click "Yes" my document opens and all of the original content is there.
I have been doing some reading, and I know that the new Office 2007 files are really .zip files with XML files that contain formatting and content information.
What I would like to know is, is there a reason why I can't save these files to the database as I have been, and if so, is there a "right" way to do this?
Hi,
Based on my understanding, the users upload the word 2007 files into database and download them with your asp.net application. When you try to open the file that is downloaded, you get the error message above. If I have misunderstood you, please feel free to let me know.
To better understand your issue, could you please confirm the following information:
When we write the file to the client, we should make sure that file doesn't contain HTML-tag. We can add Response.End() right after writing and stop further processing of the ASP.NET page. For more information, seehttp://blog.benday.com/archive/2005/08/09/2705.aspx.
Yes, you have summarized what I am doing correctly.
I have been looking into this in more detail, and after using Hex Workshop, I compared the original file and the streamed file. The streamed file contained 1 extra byte.
I reviewed my code and found that the size of the file in the database was the same as the original, so I reviewed my code in the download.aspx code-behind (the file that streams the requested document).
I had read about this earlier, so I knew not to have any HTML in the aspx.
However, it seems that the Content-Length of the file is zero-based, so when I was setting Content-Length to equal the value I had in the database, an extra byte was being added.
When I set Content-Length to equal the size of the file (in bytes) - 1, I no longer received the error.
Ex:
Dim File As New EO.Library.File(CInt(Request("file")))
Dim _BinaryLength = (CInt(File.Binary.Length) - 1)
Response.Clear()
Response.Buffer = True
Response.AddHeader("Content-Disposition", "attachment;filename=" & File.Name)
Response.AddHeader("Content-Length", CInt(_BinaryLength))
Response.ContentType = File.ContentType
Response.BinaryWrite(File.Binary)
Response.End()
Office 2007 documents not appearing in iframe
office/pdf etc documents within an iframe in a web browser.
However, since installing office 2007 this has stopped working and instead
of them appearing nicely in the iframe they now pop up and appear within the
office program.
Does anyone know if there is a way to alter the behaviour of office 2007 so
that the documents remain embedded within the iframe, or is this something
which I just have to accept.
ThanksAFAIK in both 2007 and previous version this is actually a client dependant
behavior. Try :
http://support.microsoft.com/kb/162059/en-us
Another option could be to use an object tag (not tried)...
--
Patrice
"T" <T@.discussions.microsoft.coma crit dans le message de news:
49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
Quote:
Originally Posted by
We've been developing an application for a while which allows display of
office/pdf etc documents within an iframe in a web browser.
>
However, since installing office 2007 this has stopped working and instead
of them appearing nicely in the iframe they now pop up and appear within
the
office program.
>
Does anyone know if there is a way to alter the behaviour of office 2007
so
that the documents remain embedded within the iframe, or is this something
which I just have to accept.
>
Thanks
>
Hey thanks. I did as suggested in the support article and it does now open in
the iframe.
However, this must have been something the Office 2007 installation messed
around with as everything worked fine before installing 2007. Anyone know why
this was done? Also its not something i can expect all our users to do after
they install office 2007, that they then have to for every office file type
select a check box in folder options to allow them to appear in the browser.
Does anyone have any suggestions?
Cheers
"Patrice" wrote:
Quote:
Originally Posted by
AFAIK in both 2007 and previous version this is actually a client dependant
behavior. Try :
http://support.microsoft.com/kb/162059/en-us
>
Another option could be to use an object tag (not tried)...
>
--
Patrice
>
>
>
"T" <T@.discussions.microsoft.coma écrit dans le message de news:
49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
Quote:
Originally Posted by
We've been developing an application for a while which allows display of
office/pdf etc documents within an iframe in a web browser.
However, since installing office 2007 this has stopped working and instead
of them appearing nicely in the iframe they now pop up and appear within
the
office program.
Does anyone know if there is a way to alter the behaviour of office 2007
so
that the documents remain embedded within the iframe, or is this something
which I just have to accept.
Thanks
>
>
>
re:
!http://support.microsoft.com/kb/162059/en-us
That KB needs revision.
The latest document type listed is Office 8.
Office 2007 is Office 12.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Patrice" <http://www.chez.com/scribe/wrote in message
news:OKO8sV9XHHA.4552@.TK2MSFTNGP05.phx.gbl...
Quote:
Originally Posted by
AFAIK in both 2007 and previous version this is actually a client dependant behavior. Try :
http://support.microsoft.com/kb/162059/en-us
>
Another option could be to use an object tag (not tried)...
>
--
Patrice
>
>
>
"T" <T@.discussions.microsoft.coma crit dans le message de news:
49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
Quote:
Originally Posted by
>We've been developing an application for a while which allows display of
>office/pdf etc documents within an iframe in a web browser.
>>
>However, since installing office 2007 this has stopped working and instead
>of them appearing nicely in the iframe they now pop up and appear within the
>office program.
>>
>Does anyone know if there is a way to alter the behaviour of office 2007 so
>that the documents remain embedded within the iframe, or is this something
>which I just have to accept.
>>
>Thanks
>>
>
>
I mentionned you could perhaps use an object tag inside your iframe to see
if the document is then forced to be placed inside the IE window...
"T" <T@.discussions.microsoft.coma crit dans le message de news:
AA9DF605-996F-457E-95C0-A9FE2983D49D@.microsoft.com...
Quote:
Originally Posted by
Hey thanks. I did as suggested in the support article and it does now open
in
the iframe.
>
However, this must have been something the Office 2007 installation messed
around with as everything worked fine before installing 2007. Anyone know
why
this was done? Also its not something i can expect all our users to do
after
they install office 2007, that they then have to for every office file
type
select a check box in folder options to allow them to appear in the
browser.
>
Does anyone have any suggestions?
>
Cheers
>
>
>
"Patrice" wrote:
>
Quote:
Originally Posted by
>AFAIK in both 2007 and previous version this is actually a client
>dependant
>behavior. Try :
>http://support.microsoft.com/kb/162059/en-us
>>
>Another option could be to use an object tag (not tried)...
>>
>--
>Patrice
>>
>>
>>
>"T" <T@.discussions.microsoft.coma crit dans le message de news:
>49BA0ADC-30D0-4B2E-8724-F3823CBFD8DD@.microsoft.com...
Quote:
Originally Posted by
We've been developing an application for a while which allows display
of
office/pdf etc documents within an iframe in a web browser.
>
However, since installing office 2007 this has stopped working and
instead
of them appearing nicely in the iframe they now pop up and appear
within
the
office program.
>
Does anyone know if there is a way to alter the behaviour of office
2007
so
that the documents remain embedded within the iframe, or is this
something
which I just have to accept.
>
Thanks
>
>>
>>
>>
office automation
I have written a bunch of apps in vb .net that automated different office apps. I am very new to asp however. I created an asp .net web application in vs net added a button to a form and inserted this code:
Dim xlapp As Excel.Application
Response.Write("excel")
'Response.Write("fname = " & Fname)
xlapp = New Excel.Application
and it crashes with an access denied error
ive read some things on line about automating office with asp but they always seem to use c code and i would much rather use vb code
any help/advice or places i can go to read up on this would be greatly appreciated
ThanksHi,
Take a look @.Create and Modify Excel Files (VB)
HTH
Office Automation - Powerpoint in VB.Net
Hi
I tried to do the Powerpoint presentation using VB.Net 2.0. I got error while creating the object of the Powerpoint.Application
Unable to cast COM object of type 'PowerPoint.ApplicationClass' to interface type 'PowerPoint._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
Can any one tell me the solution for this error.?
Ganesh.
Hi Ganesh,
The error indicates that the PowerPoint.ApplicationClass was not registered on the running machine properly. A COM class needs to be registered in the registery to make it identified. The register process is done at the installation phase of Office.
So you can try to repair the installation of PowerPoint or make sure it is installed properly.
Further more, in an ASP.NET application, server side automation is not supported. Here is a KB article about this.
http://support.microsoft.com/kb/257757/en-us
Hope this helps.
office automation
interop but it is not working on my webserver so do you know any component by
which i give facility in my application to count words
Kbalz wrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
Quote:
Originally Posted by
you say for this link i try it but it is not working
>>
>[quoted text clipped - 14 lines]
Quote:
Originally Posted by
>Mark Rae
>ASP.NET MVPhttp://www.markrae.net
>
>The automation could save you $500 quickly depending on what scale of
>usage you are talking about.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Fo...sp-net/200710/1"akshar108 via DotNetMonster.com" <u37462@.uwewrote in message
news:79383d837bf05@.uwe...
Quote:
Originally Posted by
I want to count words of .doc ,.ppt,.xls,.html,.rtf i done all things with
interop but it is not working on my webserver so do you know any component
by
which i give facility in my application to count words
http://www.aspose.com/Products/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
office automation securiy error
keep getting an ASP.NET permission error. first I thought it was been caused
while trying to save the document, and I added permissions for the ASP.NET
account to my folders. after that I realized that the error was being
launche at the very first line of my function:
Word.ApplicationClass WordApp = new Word.ApplicationClass();
any ideas on how to solve this?
Thanks a lot,
Alejandro.For those who need the answer visit this link:
http://www.codeproject.com/aspnet/w...9372#xx999372xx
"Alejandro Penate-Diaz" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Hi. While trying to create a a word document in one of my asp.net pages I
> keep getting an ASP.NET permission error. first I thought it was been
> caused while trying to save the document, and I added permissions for the
> ASP.NET account to my folders. after that I realized that the error was
> being launche at the very first line of my function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
>
>
Not to be a nark or anything, but I think the licensing for office prohibits
this sort of usage on a webserver. Or, rather, you're supposed to have a
license for office for each user using your web application. At least this
is my understanding. I'd check the EULA.
BTW, this should be unrelated to the permission problem ;)
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi. While trying to create a a word document in one of my asp.net
> pages I keep getting an ASP.NET permission error. first I thought it
> was been caused while trying to save the document, and I added
> permissions for the ASP.NET account to my folders. after that I
> realized that the error was being launche at the very first line of my
> function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
It's probably a security issue.
The ASPNET user account does have permission to run office by default.
You can use impersonation to have ASP.NET run under a different user account
that does have the necessary permission.
For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/>
Here's more info on impersonation:
http://msdn.microsoft.com/library/d...personation.asp
Here's more info on generating office documents, including the wrong ways
(like office automation) and the right ways:
http://SteveOrr.net/articles/ExcelExport.aspx
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alejandro Penate-Diaz" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Hi. While trying to create a a word document in one of my asp.net pages I
> keep getting an ASP.NET permission error. first I thought it was been
> caused while trying to save the document, and I added permissions for the
> ASP.NET account to my folders. after that I realized that the error was
> being launche at the very first line of my function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
>
>
office automation securiy error
keep getting an ASP.NET permission error. first I thought it was been caused
while trying to save the document, and I added permissions for the ASP.NET
account to my folders. after that I realized that the error was being
launche at the very first line of my function:
Word.ApplicationClass WordApp = new Word.ApplicationClass();
any ideas on how to solve this?
Thanks a lot,
Alejandro.For those who need the answer visit this link:
http://www.codeproject.com/aspnet/w...9372#xx999372xx
"Alejandro Penate-Diaz" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Hi. While trying to create a a word document in one of my asp.net pages I
> keep getting an ASP.NET permission error. first I thought it was been
> caused while trying to save the document, and I added permissions for the
> ASP.NET account to my folders. after that I realized that the error was
> being launche at the very first line of my function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
>
Not to be a nark or anything, but I think the licensing for office prohibits
this sort of usage on a webserver. Or, rather, you're supposed to have a
license for office for each user using your web application. At least this
is my understanding. I'd check the EULA.
BTW, this should be unrelated to the permission problem ;)
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi. While trying to create a a word document in one of my asp.net
> pages I keep getting an ASP.NET permission error. first I thought it
> was been caused while trying to save the document, and I added
> permissions for the ASP.NET account to my folders. after that I
> realized that the error was being launche at the very first line of my
> function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
It's probably a security issue.
The ASPNET user account does have permission to run office by default.
You can use impersonation to have ASP.NET run under a different user account
that does have the necessary permission.
For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/
Here's more info on impersonation:
http://msdn.microsoft.com/library/d...personation.asp
Here's more info on generating office documents, including the wrong ways
(like office automation) and the right ways:
http://SteveOrr.net/articles/ExcelExport.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alejandro Penate-Diaz" <alexware69@.hotmail.com> wrote in message
news:%239TUIGSOFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Hi. While trying to create a a word document in one of my asp.net pages I
> keep getting an ASP.NET permission error. first I thought it was been
> caused while trying to save the document, and I added permissions for the
> ASP.NET account to my folders. after that I realized that the error was
> being launche at the very first line of my function:
> Word.ApplicationClass WordApp = new Word.ApplicationClass();
> any ideas on how to solve this?
> Thanks a lot,
> Alejandro.
>
Office Components and IIS and .NET Framework
Thanks so much.Yes, it is recommended not to run office products on a dedicated server.
On one of our servers, MS Access was put on it ONLY because a couple databases may need maintainence from time to time.
There are other servers; however, that are dedicated to running office products that the entire company can share so people don't have to load those products on their local machine.
You may want to look into that option, another server running office and utilities, and then connect to that from your IIS server to launch Word.
Zath
Thanks for your reply.
I was referring to creating word documents via C#.NET using a web pageas the interface. My attempts to do so using wordApp = newWord.ApplicationClass(); failed with error:
COM object with CLSID {000209FF-0000-0000-C000-000000000046} is either not valid or not registered
which I understood was related to Word not being available on the Web Server.
I will look at using MIME types.
Thank you again!
a once former virgin poster,
elle_f
And just came across this bit of code that may interest you...
http://www.developerfusion.com/forums/topic-22540
Zath
Office Document Viewer
i am searching for a WebForm Component or a Way to show
Word, Powerpoint and Excel Files in an Viewer on the ASPX
Page. Is this possible? How can i do that or which
Component can is use?
Thanks
Yavuz BogazciYou can use office web components. For example Microsoft Office SpreadSheet
component to display excel files. It must be on the components tab, if it is
not there add it using add/remove items
"Yavuz Bogazci" <news_NOSPAMM_@.bogazci.com> wrote in message
news:0b8401c3af49$74c3d390$a301280a@.phx.gbl...
> Hi,
> i am searching for a WebForm Component or a Way to show
> Word, Powerpoint and Excel Files in an Viewer on the ASPX
> Page. Is this possible? How can i do that or which
> Component can is use?
> Thanks
> Yavuz Bogazci
Can i use this on WebForms? An what should i use for Word Documents?
Thanks
Yavuz Bogazci
"Ayca Aksu" <ayca_aksu@.hotmail.com.nospam> schrieb im Newsbeitrag
news:OPcWhQ2rDHA.4056@.TK2MSFTNGP11.phx.gbl...
> You can use office web components. For example Microsoft Office
SpreadSheet
> component to display excel files. It must be on the components tab, if it
is
> not there add it using add/remove items
> "Yavuz Bogazci" <news_NOSPAMM_@.bogazci.com> wrote in message
> news:0b8401c3af49$74c3d390$a301280a@.phx.gbl...
> > Hi,
> > i am searching for a WebForm Component or a Way to show
> > Word, Powerpoint and Excel Files in an Viewer on the ASPX
> > Page. Is this possible? How can i do that or which
> > Component can is use?
> > Thanks
> > Yavuz Bogazci
Office interop from asp.net (vb) - permissions problem....
I am trying to open a word document from an asp.net page but I keep getting
an access denied error when I try to create an instance of the word
applications.
I have created references to the Office 11.0 Object and it imported the
other references (except stdole which I did manually)
I have imported namepsaces:
Imports System.ComponentModel
Imports Microsoft.Office.Interop
The code I am calling is:
Dim oWordApp As Word.Application
Dim oWordDoc As Word.Document
oWordApp = New Word.Application '<<<<<<<<<<<<<<<<< ERROR
oWordDoc = oWordApp.Documents.Open("c:\text.doc")
The error below says I should give access permission to the ASPNET user. But
a) that user does not exist on my machine - I think it is 'Authenticated
user' that I need and b) which file needs to be given permission?!? I have
tried giving this user full control over the entire Office folder (not
something I'd do on a production server), but no go!
Does anyone know which file needs permission? Any other suggestions?
Thanks in advance,
Stuart
================================================== ==================
The error:
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.No. ASPNET is a restricted account that's somewhat like "guest" account. It
cannot be used to execute anything outside your web process.
Instead, you should try to "impersonate"(Google for this keyword for usage)
a real "user" account, and give the "user" permission to that directory too,
of course.
"Stu" <s.lock@.cergis.com> glsD:OTqqejQjFHA.3144@.TK2MSFTNGP12.phx.g bl...
> Hi,
> I am trying to open a word document from an asp.net page but I keep
> getting an access denied error when I try to create an instance of the
> word applications.
> I have created references to the Office 11.0 Object and it imported the
> other references (except stdole which I did manually)
> I have imported namepsaces:
> Imports System.ComponentModel
> Imports Microsoft.Office.Interop
> The code I am calling is:
> Dim oWordApp As Word.Application
> Dim oWordDoc As Word.Document
> oWordApp = New Word.Application '<<<<<<<<<<<<<<<<< ERROR
> oWordDoc = oWordApp.Documents.Open("c:\text.doc")
> The error below says I should give access permission to the ASPNET user.
> But a) that user does not exist on my machine - I think it is
> 'Authenticated user' that I need and b) which file needs to be given
> permission?!? I have tried giving this user full control over the entire
> Office folder (not something I'd do on a production server), but no go!
> Does anyone know which file needs permission? Any other suggestions?
> Thanks in advance,
> Stuart
>
> ================================================== ==================
> The error:
> 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.
Many thanks - that did the trick.
Stu
"Lau Lei Cheong" <leu_lc@.yehoo.com.hk> wrote in message
news:evrIHLRjFHA.3580@.TK2MSFTNGP09.phx.gbl...
> No. ASPNET is a restricted account that's somewhat like "guest" account.
> It cannot be used to execute anything outside your web process.
> Instead, you should try to "impersonate"(Google for this keyword for
> usage) a real "user" account, and give the "user" permission to that
> directory too, of course.
> "Stu" <s.lock@.cergis.com>
> glsD:OTqqejQjFHA.3144@.TK2MSFTNGP12.phx.g bl...
>> Hi,
>>
>> I am trying to open a word document from an asp.net page but I keep
>> getting an access denied error when I try to create an instance of the
>> word applications.
>>
>> I have created references to the Office 11.0 Object and it imported the
>> other references (except stdole which I did manually)
>>
>> I have imported namepsaces:
>>
>> Imports System.ComponentModel
>> Imports Microsoft.Office.Interop
>>
>> The code I am calling is:
>>
>> Dim oWordApp As Word.Application
>> Dim oWordDoc As Word.Document
>> oWordApp = New Word.Application '<<<<<<<<<<<<<<<<< ERROR
>> oWordDoc = oWordApp.Documents.Open("c:\text.doc")
>>
>> The error below says I should give access permission to the ASPNET user.
>> But a) that user does not exist on my machine - I think it is
>> 'Authenticated user' that I need and b) which file needs to be given
>> permission?!? I have tried giving this user full control over the entire
>> Office folder (not something I'd do on a production server), but no go!
>>
>> Does anyone know which file needs permission? Any other suggestions?
>>
>> Thanks in advance,
>>
>> Stuart
>>
>>
>> ================================================== ==================
>> The error:
>> 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.
>>
Many thanks - that did the trick.
Stu
"Lau Lei Cheong" <leu_lc@.yehoo.com.hk> wrote in message
news:evrIHLRjFHA.3580@.TK2MSFTNGP09.phx.gbl...
> No. ASPNET is a restricted account that's somewhat like "guest" account.
> It cannot be used to execute anything outside your web process.
> Instead, you should try to "impersonate"(Google for this keyword for
> usage) a real "user" account, and give the "user" permission to that
> directory too, of course.
> "Stu" <s.lock@.cergis.com>
> glsD:OTqqejQjFHA.3144@.TK2MSFTNGP12.phx.g bl...
>> Hi,
>>
>> I am trying to open a word document from an asp.net page but I keep
>> getting an access denied error when I try to create an instance of the
>> word applications.
>>
>> I have created references to the Office 11.0 Object and it imported the
>> other references (except stdole which I did manually)
>>
>> I have imported namepsaces:
>>
>> Imports System.ComponentModel
>> Imports Microsoft.Office.Interop
>>
>> The code I am calling is:
>>
>> Dim oWordApp As Word.Application
>> Dim oWordDoc As Word.Document
>> oWordApp = New Word.Application '<<<<<<<<<<<<<<<<< ERROR
>> oWordDoc = oWordApp.Documents.Open("c:\text.doc")
>>
>> The error below says I should give access permission to the ASPNET user.
>> But a) that user does not exist on my machine - I think it is
>> 'Authenticated user' that I need and b) which file needs to be given
>> permission?!? I have tried giving this user full control over the entire
>> Office folder (not something I'd do on a production server), but no go!
>>
>> Does anyone know which file needs permission? Any other suggestions?
>>
>> Thanks in advance,
>>
>> Stuart
>>
>>
>> ================================================== ==================
>> The error:
>> 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.
>>
Office PIA bomb out
valid or not registered.
This is coming from the webserver. I've downloaded the office PIA's. Used
the register.bat. I'm stump as to what to do next. The structure of the
registry folder is different from what my machine looks like. I have 13 sub
folders under this object, the webserver only has one. This CLSID belongs to
the chartspace object. The only difference i can see between the two
machines is that my own runs studio, the webserver does not. I've
uninstalled and re-isntalled.
no joy.
This is the code failing:
OWC10.ChartSpace objCSpace = new OWC10.ChartSpace();sorry posted this to the wrong group
"Alvin Bruney" <vapordan_spam_me_not@.hotmail_no_spamhotmail.com> wrote in
message news:erRZviOSDHA.3700@.tk2msftngp13.phx.gbl...
> COM object with CLSID {0002E556-0000-0000-C000-000000000046} is either not
> valid or not registered.
> This is coming from the webserver. I've downloaded the office PIA's. Used
> the register.bat. I'm stump as to what to do next. The structure of the
> registry folder is different from what my machine looks like. I have 13
sub
> folders under this object, the webserver only has one. This CLSID belongs
to
> the chartspace object. The only difference i can see between the two
> machines is that my own runs studio, the webserver does not. I've
> uninstalled and re-isntalled.
> no joy.
> This is the code failing:
> OWC10.ChartSpace objCSpace = new OWC10.ChartSpace();
Office Toolbar Css
toolbars etc. I'm rubbish at webdesign and I just want my pages to look
professional. Regards, Chris.I googled toolbar controls, got back a few thousand.
--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-----------------
"Chris" <nospam@.btinternet.com> wrote in message
news:Ow30ukfeGHA.3888@.TK2MSFTNGP02.phx.gbl...
> Does anyone know where I download a css file which mimics Office style
> toolbars etc. I'm rubbish at webdesign and I just want my pages to look
> professional. Regards, Chris.
I wasn't thinking of an actual control just if had some css files to format
things like buttons and menu bars that come with .net 2. Make them look a
bit more professional.
"Alvin Bruney" <www.lulu.com/owc> wrote in message
news:eTE4ZDneGHA.3996@.TK2MSFTNGP04.phx.gbl...
>I googled toolbar controls, got back a few thousand.
> --
> ________________________
> Warm regards,
> Alvin Bruney [MVP ASP.NET]
> [Shameless Author plug]
> Professional VSTO.NET - Wrox/Wiley
> The O.W.C. Black Book with .NET
> www.lulu.com/owc, Amazon
> Blog: http://www.msmvps.com/blogs/alvin
> -----------------
> "Chris" <nospam@.btinternet.com> wrote in message
> news:Ow30ukfeGHA.3888@.TK2MSFTNGP02.phx.gbl...
>> Does anyone know where I download a css file which mimics Office style
>> toolbars etc. I'm rubbish at webdesign and I just want my pages to look
>> professional. Regards, Chris.
>>
Office Toolbar Css
toolbars etc. I'm rubbish at webdesign and I just want my pages to look
professional. Regards, Chris.I googled toolbar controls, got back a few thousand.
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
----
"Chris" <nospam@.btinternet.com> wrote in message
news:Ow30ukfeGHA.3888@.TK2MSFTNGP02.phx.gbl...
> Does anyone know where I download a css file which mimics Office style
> toolbars etc. I'm rubbish at webdesign and I just want my pages to look
> professional. Regards, Chris.
>
I wasn't thinking of an actual control just if had some css files to format
things like buttons and menu bars that come with .net 2. Make them look a
bit more professional.
"Alvin Bruney" <www.lulu.com/owc> wrote in message
news:eTE4ZDneGHA.3996@.TK2MSFTNGP04.phx.gbl...
>I googled toolbar controls, got back a few thousand.
> --
> ________________________
> Warm regards,
> Alvin Bruney [MVP ASP.NET]
> [Shameless Author plug]
> Professional VSTO.NET - Wrox/Wiley
> The O.W.C. Black Book with .NET
> www.lulu.com/owc, Amazon
> Blog: http://www.msmvps.com/blogs/alvin
> ----
> "Chris" <nospam@.btinternet.com> wrote in message
> news:Ow30ukfeGHA.3888@.TK2MSFTNGP02.phx.gbl...
>
office web component
I found this article very helpful
http://www.devx.com/xml/Article/7018/0
Hello,
you have different options to use the OWC but basically you have to store all the files which you want to display with owc in XML-format. For example if you want to load an excel-spreadsheet you must save this as an "XML-Spreadsheet" file before. This is the only format that the OWC Spreadsheet Component can read and bring in all the formulas, etc. Do not attempt to load a regular XLS file in OWC, it can't be done...
Then you can load the spreadsheet in your webform with simple code like i show you in the following example. This is VB.Net but of course you can do it in C# as well:
Dim spreadsheet As OWC10.SpreadsheetClass = New SpreadsheetClassThis is an absolute beginner example. If you want to learn more i would recommend the following links:
spreadsheet .XMLURL = MapPath("OWCTest.xml")
spreadsheet .Range("B1:B3").Cells(1).Value = Convert.ToInt32(txtField1.Text)
spreadsheet .Range("B1:B3").Cells(2).Value = Convert.ToInt32(txtField2.Text)
spreadsheet .CalculateFull()
lblMessage.Text = "The result is: " & (sp.Range("B1:B3").Cells(4).Value)
Creating Excel Spreadsheets with Office Web Components (OWC)
Charting with Office Web Components (OWC)
Creating Dynamic Charts in ASP. NET Web Applications Using OWC
Even MS has a good KB article about this issue:
HOW TO: Use a DataSet with the Office XP Chart Component and ASP.NET
HTH,
Office Web Componenets for Access?
in mind is a site where Access users can log in and update their Access
databases with new records that have been uploaded by other Access users.
Or perhaps I could have a "shared records" page where anyone can update/add
to a shared record.
The purpose is to have a "sometimes connected" Access application where
folks can log on and share/update/synchronize records as they have
opportunity.
Has anyone done this? Is this even possible with OWC?
Thanks in advance.yup, its possible. The OWC components can handle user input quiet easily
with little work on your part. There are licensing issues you have to
contend with but you can read more about the intricacies of licensing in the
black book.
--
Regards,
Alvin Bruney - ASP.NET MVP
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @. www.lulu.com/owc, Amazon.com etc
"deko" <deko@.deko.com> wrote in message
news:%B0ve.1889$N22.1854@.newssvr21.news.prodigy.co m...
> Has anyone had success with Office Web Components with Access? What I
> have
> in mind is a site where Access users can log in and update their Access
> databases with new records that have been uploaded by other Access users.
> Or perhaps I could have a "shared records" page where anyone can
> update/add
> to a shared record.
> The purpose is to have a "sometimes connected" Access application where
> folks can log on and share/update/synchronize records as they have
> opportunity.
> Has anyone done this? Is this even possible with OWC?
> Thanks in advance.
Office Web Components
I have a project that requires the use of OWC(Office Web Components) for charting values stored into SQL Server. What's the best method to use this, Classic ASP? or ASP.NET (VB.NET) or (C#) ?? I heard that this OWC is not very well documented, is there any examples out there ??.
Thanks In Advance
TonyIf you only need charting you can use a control I've built:
WebChart control
office web components
I'm producing charts on the fly using Office Web Components and VBScript in
my ASP.NET application. The problem for me is that VBScript (which I'm new
at) and VBA (which I have a bit of experience in) use fairly different code
to achieve the same thing.
If I take a previously produced chart (produced manually in Excel) as a
template, is there any way to list all the chart's properties and settings,
specifically the non-default settings? I've tried visually recreating the
chart with the Macro Recorder on, but this isn't very helpful for two
reasons: I would have to recreate an awful lot of charts; and the massive
list of properties put out by the Macro Recorder don't make it immediately
clear which are mine and which are the defaults/non-essential settings?
Please help!
Best regards
LoaneHi Loane:
I believe these are two distinct objects are they not? One is an OWC.Chart
and the other an MSChart.Chart, thus the difference isn't in the language
but the object model.
Scott
http://www.OdeToCode.com/blogs/scott/
> Hi there
> I'm producing charts on the fly using Office Web Components and
> VBScript in my ASP.NET application. The problem for me is that
> VBScript (which I'm new at) and VBA (which I have a bit of experience
> in) use fairly different code to achieve the same thing.
> If I take a previously produced chart (produced manually in Excel) as
> a template, is there any way to list all the chart's properties and
> settings, specifically the non-default settings? I've tried visually
> recreating the chart with the Macro Recorder on, but this isn't very
> helpful for two reasons: I would have to recreate an awful lot of
> charts; and the massive list of properties put out by the Macro
> Recorder don't make it immediately clear which are mine and which are
> the defaults/non-essential settings?
> Please help!
> Best regards
> Loane
Hi Scott
Nothing like a novice to sound like a complete idiot! I suppose what I
should have said is, I find the OWC Help file a bit sparse, and I'm trying
to find a detailed listing of the properties, enumerated constants,
appropriate syntax, etc. associated with OWC chartspaces. I've found some
great articles on MSDN, but these are pretty introductory. I was hoping
there'd be a close mapping between VBA and VBScript in this respect, but not
much luck. I should have known there'd be no lazy way out.
Thanks for your reply.
Best regards
Loane
> I believe these are two distinct objects are they not? One is an OWC.Chart
> and the other an MSChart.Chart, thus the difference isn't in the language
> but the object model.
>
office web components
I'm producing charts on the fly using Office Web Components and VBScript in
my ASP.NET application. The problem for me is that VBScript (which I'm new
at) and VBA (which I have a bit of experience in) use fairly different code
to achieve the same thing.
If I take a previously produced chart (produced manually in Excel) as a
template, is there any way to list all the chart's properties and settings,
specifically the non-default settings? I've tried visually recreating the
chart with the Macro Recorder on, but this isn't very helpful for two
reasons: I would have to recreate an awful lot of charts; and the massive
list of properties put out by the Macro Recorder don't make it immediately
clear which are mine and which are the defaults/non-essential settings?
Please help!
Best regards
LoaneHi Loane:
I believe these are two distinct objects are they not? One is an OWC.Chart
and the other an MSChart.Chart, thus the difference isn't in the language
but the object model.
--
Scott
http://www.OdeToCode.com/blogs/scott/
> Hi there
> I'm producing charts on the fly using Office Web Components and
> VBScript in my ASP.NET application. The problem for me is that
> VBScript (which I'm new at) and VBA (which I have a bit of experience
> in) use fairly different code to achieve the same thing.
> If I take a previously produced chart (produced manually in Excel) as
> a template, is there any way to list all the chart's properties and
> settings, specifically the non-default settings? I've tried visually
> recreating the chart with the Macro Recorder on, but this isn't very
> helpful for two reasons: I would have to recreate an awful lot of
> charts; and the massive list of properties put out by the Macro
> Recorder don't make it immediately clear which are mine and which are
> the defaults/non-essential settings?
> Please help!
> Best regards
> Loane
Hi Scott
Nothing like a novice to sound like a complete idiot! I suppose what I
should have said is, I find the OWC Help file a bit sparse, and I'm trying
to find a detailed listing of the properties, enumerated constants,
appropriate syntax, etc. associated with OWC chartspaces. I've found some
great articles on MSDN, but these are pretty introductory. I was hoping
there'd be a close mapping between VBA and VBScript in this respect, but not
much luck. I should have known there'd be no lazy way out.
Thanks for your reply.
Best regards
Loane
> I believe these are two distinct objects are they not? One is an OWC.Chart
> and the other an MSChart.Chart, thus the difference isn't in the language
> but the object model.
>> I'm producing charts on the fly using Office Web Components and
>> VBScript in my ASP.NET application. The problem for me is that
>> VBScript (which I'm new at) and VBA (which I have a bit of experience
>> in) use fairly different code to achieve the same thing.
>>
>> If I take a previously produced chart (produced manually in Excel) as
>> a template, is there any way to list all the chart's properties and
>> settings, specifically the non-default settings? I've tried visually
>> recreating the chart with the Macro Recorder on, but this isn't very
>> helpful for two reasons: I would have to recreate an awful lot of
>> charts; and the massive list of properties put out by the Macro
>> Recorder don't make it immediately clear which are mine and which are
>> the defaults/non-essential settings?
Office Web Components
Does anyone know of a web site(s) with examples of working with Microsoft
Web Components? Or some examples?
Thanks to all...Hi Randy:
Google will turn up many good examples:
http://www.google.com/search?hl=en&q=owc+asp.net
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Wed, 25 May 2005 09:42:12 -0500, "Randy" <temp@.temp.com> wrote:
>Hello,
>Does anyone know of a web site(s) with examples of working with Microsoft
>Web Components? Or some examples?
>Thanks to all...
You should get the black book. It provides all that you need.
--
Regards,
Alvin Bruney - ASP.NET MVP
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @. www.lulu.com/owc, Amazon.com etc
"Randy" <temp@.temp.com> wrote in message
news:uZdHxfTYFHA.3836@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Does anyone know of a web site(s) with examples of working with Microsoft
> Web Components? Or some examples?
> Thanks to all...