|
I have a Problem with this subject. I made a program using asp.net to load a word file. But i can't load it using Microsoft Word 10.0 Object Library in Com Preference. The program running but when it go to this code:
Private wordapp As Word.ApplicationClass
wordapp = New Word.ApplicationClass()
it always have the error:
"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."
I think someone have a file wordapplication.dll that uses good with this problem.
Please help me. Thanks a lot. My email address: aeriscute@yahoo.com
Hanh Aeriscute
|
|
|
|
|
Hi Hanh,
The ASP.NET process identity (the ASPNET or NETWORKSERVICE account) does not have the permission to activate the Word COM object, in this case you need to use the DCOMCNFG tool to grant the permissions. Also, you need to carefully consider using the Automation at the server side as there are a couple of problems which you can find in the documents below. Instead, you may consider using a third-party component like Aspose.Word which supports working with the Word document without using the Automation.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;288367[^]
http://support.microsoft.com/kb/257757/[^]
|
|
|
|
|
very good advice
|
|
|
|
|
"Big" Mike's compliments are always my pleasure .
How are you? You still keep us waiting for your next great article in the ASP.NET 2.0
|
|
|
|
|
minhpc_bk wrote: "Big" Mike's compliments are always my pleasure
Big? Well, I guess I have gained some weight...
minhpc_bk wrote: How are you? You still keep us waiting for your next great article in the ASP.NET 2.0
Doing good, but busy! Hey, for that matter, you're keeping us waiting for yours!
|
|
|
|
|
Mike Ellison wrote: Big? Well, I guess I have gained some weight...
Is it good for you if you have gained some weight, Mike ? In fact, I mean your name is really "big" (well-known) here at CodeProject !
|
|
|
|
|
minhpc_bk wrote: Is it good for you if you have gained some weight, Mike ?
Unfortunately, no!
(but thanks for the kind words, min )
|
|
|
|
|
if the document can be read-only, you could just redirect your page to it...
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
hi all,
in my application im using HTML dropdown list ,in which i got list of mail id's and text name of that.so if select any of that id i want that value should be displayed in textbox in my form,,without postback it i need to do this with Javascript .please anyone tell me the way.
with regards,
susa
|
|
|
|
|
hi all,
for the above problem,i didn't mentioned my code.
im using this one.someone tell me what i have to do
function fnOnchange(){
var ddobj=document.getElementById("<=%DDL2 %>");
var txtobj=document.getElementById("<=%TextBox1%>%");
txtobj.value=ddobj.Options[ddobj.SelectedIndex].value;
return true;
// txtobj.value=ddobj.SelectedIndex.value;
}
hi to all
with regards,
susa
|
|
|
|
|
put a onchange attribut into your select box :
<code>
<select ... on_change="copyEmail" id="yourSelect">
...
</select>
</code>
(remove _ in from the on_change)
and then write a JS function:
function copyEmail ()
{
var selectElement = document.getElementById ( 'yourSelect' );
var textElement = document.getElementById ( 'yourTextBoxID' );
textElement.value = selectElement.options[selectElement.selectedIndex].value;
}
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
-- modified at 8:53 Friday 28th April, 2006
|
|
|
|
|
put a onchange attribut into your select box :
...
and then write a JS function:
function copyEmail ()
{
var selectElement = document.getElementById ( 'yourSelect' );
var textElement = document.getElementById ( 'yourTextBoxID' );
textElement.value = selectElement.options[selectElement.selectedIndex].value;
}
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi CWIZO,
you helped me a lot cause the code you given is working great.thank you very much.
with regards,
susa
|
|
|
|
|
Hey no problem
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
I would like to be able to send emails from the asp.net 2.0 website when recovering a password using the password recovery control.
I do have the IP addresses for email Gateway and the mail server.
Where do I set these settings please? Is it somewhere in the web.config?
Thanks
|
|
|
|
|
There are two options:
+ Use the ASP.NET Web Application Administration tool to configure the SMTP settings for your app in the Application tab.
+ Manually configure the stmp setting[^] in the web.config.
|
|
|
|
|
I'm trying to pass the page object into a vb class contained in my project I understand that the call is:
classname(this)
but how would the Page object be defined in the class and in the parameter field for the constructor.
Thanks in advance
|
|
|
|
|
public classname(aPage as System.Web.UI.Page)
or import the system.web.ui namespace and just refer to it as page. You will need to add a reference to your project containing the class to the system.web dll.
|
|
|
|
|
Thank you for the quick reply.
I have another question, Can i then reference say a textbox from the page in that class?
how would I do that?
aPage.textbox?
|
|
|
|
|
My first suggestion would be to try it and see...
|
|
|
|
|
Its erroring as the class just knows its a Page but doesnt know the controls on the page so i think i'll have to find the control somehow
Thanks again
|
|
|
|
|
Try the controls collection. If you're using .net 2005 then you might want to read up a bit on what kind of issues you might get as the page is made up of two combinded partial classes (i think).
|
|
|
|
|
Yea I came across an article on that issue, the page.findControl(controlId) function will return the control and i'll need the contol collection to loop through dynamic controls
Thank you for your help
|
|
|
|
|
hi,
i have a txtbox in grid where user gives the input.i have to store the text into database. but iam unable to get the text. this is code iam using:
Dim TxtBox As TextBox = CType(DataGrid1.Items(count).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox)
Dim Timing As String = TxtBox.Text
Response.Write(timing)
please help
Thanks and Regards,
David Boon.
|
|
|
|
|
Are you getting an error? Where is this code running (in datagrid command event or after a button click?)
|
|
|
|