|
I'm sending mail with excel attchment and it's working fine when I run it from my local
machine. but if I try to access it from another machine it's giving me this
Error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Error coming on first line of below code
Microsoft.Office.Interop.Excel.Workbook aBook;
Microsoft.Office.Interop.Excel.Application ExlApp = new Microsoft.Office.Interop.Excel.Application();
i have given all rights (http://blog.crowe.co.nz/archive/2006/03/02/589.aspx[^])
still error is coming
please help me out as soon as possible
|
|
|
|
|
It looks like your target machine does not have Excel or the interop libraries installed.
It's time for a new signature.
|
|
|
|
|
What exactly are you doing with the Excel objects? You certainly don't need excel to send an e-mail. If you are creating or modifying the spreadsheet before you send it, is it something you could do through the ODBC driver? Don't assume that anything outside of the System namespace will be installed on a server.
|
|
|
|
|
Hi all,
I there any common in built class to encrypt password in java(black berry, android api) and objective c(iphone). I heard about Md5 but don't know whether it is available for all these languages.
thanks & regards
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
MD5 is an algorithm, so it can be implemented in any language. If it is implemented in java it should give the same results as the C# or C implementation. Don't know if it is though.
Do note that MD5 is:
1) Not an encryption algorithm. It is a hashing algorithm, which means you cannot get back to your original data from the MD5 value. For password comparison it should be ok, but not if the password is used to encrypt data or access a database, etc.
2) Not recommended for new projects, as it is officially classed as "broken". (I.e. a mechanism has been found to generate a valid input sequence from an MD5 value) Use SHA instead if you can
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Yes.
Buy this book[^]
I bought it back when it came out ... that makes me old, and it contains enough coverage to make you comfortable with encryption in the modern languages, Java and even .NET. The chat application in this book answers the annual question that we constant get on this forum of, "How do I build a chat application" as well.
|
|
|
|
|
Hi all,
To be precise, I have a winform (say form A) with buttons on it, which when clicked, opens up new forms (say b, c, d).
I want to set form A as the owner and forms b,c,d as owned forms of form A.
The basic thing which I am looking to achieve is that when I close form A , I want to close all other owned forms and warn the user that some forms that belong to form A are already open and if they would like to close it?
FYI - form A is already a ChildForm of a MDI parent in my application.
Any help will be appreciated.
Thanks,
|
|
|
|
|
Hi,
inside class FormA, instead of doing formB.Show() or formB.ShowDialog() , do formB.Show(this) or formB.ShowDialog(this) .
|
|
|
|
|
thanks for your reply,
But the problem is, I want the form to be displayed within the MDI parent container.
If I use Show() or ShowDialogue() the form is displayed outside the MDI parent container.
|
|
|
|
|
then try something like this:
FormB formB = new FormB();
formB.MdiParent = this;
formB.Show();
|
|
|
|
|
Hi thanks for your reply.
Am getting this exception error when I write Ur code.
"Form that was specified to be the MdiParent for this form is not an MdiContainer.
Parameter name: value "
|
|
|
|
|
then fix the error. stuff the parent where it goes.
|
|
|
|
|
Mate,
This is the hierarchy of my app.
MDIParent > MDIChild > buttons to open additional forms.
these forms appear in the MDI Container if I set
form.MDIParent = this.MDIParent
But my question is When I close the child form, I want to close all other open forms which are opened through button clicks?
|
|
|
|
|
|
Thats the whole issue mate. If I say
Show(this) or ShowDialog(this) I get the error which says
"Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling showDialog."
Ohh I better ask Uncle Google instead.
Cheers
|
|
|
|
|
you need to set the IsMdiContainer (IIRC) property to true in the parent form.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Good Day All
I have a Method that i have defined that i will access in JavaScript(Page Method) and its defined like this
[WebMethod, System.Web.Script.Services.ScriptMethod]
public static void Getadata(String StrSearch)
{
View obj = new View();
obj.Bind_SearchBox(StrSearch);
}
And the Bind_SearchBox() method is a non static method that is defined in this code behind of this page and View is the class name of the Page. Now i debugged this and i see the results are passed to the method and the Method is Defined like this
public void Bind_SearchBox(String Search)
{
ViewerService.ViewerService obj = new ViewerService.ViewerService();
String SessionKey = obj.newSession();
DateTime Date1 = Convert.ToDateTime("1980-01-01");
DateTime Date2 = Convert.ToDateTime("2012-12-31");
ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", "");
try
{
RadPanelBar1.Items.Clear();
RadScheduler1.Appointments.Clear();
int Len = extract.set.Length;
for (int i = 0; i < Len; i++)
{
ViewerService.vertex value = extract.set[i];
String PanelClass = value.meta;
PanelClass = PanelClass.Replace(Remstr, "");
PanelClass = PanelClass.Replace(Remstr2, "");
Appointment app = null;
if (value.atom != null)
{
RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);
if (pane == null)
{
RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass);
RadPanelItem nwpaneSpliter = new Telerik.Web.UI.RadPanelItem(PanelClass);
nwpaneSpliter.IsSeparator = true;
RadPanelBar1.Items.Add(nwpane);
pane = nwpane;
}
if (value.meta == "za.co.abacus.C_EVENT")
{
app = new Appointment();
}
int atomLen = value.atom.Length;
for (int j = 0; j < atomLen; j++)
{
ViewerService.atom atm = value.atom[j];
if (atm.meta.Contains("za.co.reactor.A_LABEL"))
{
RadPanelItem NewItem = new RadPanelItem(atm.content);
pane.Items.Add(NewItem);
if (app != null)
{
app.Subject = atm.content;
app.Description = atm.content;
app.ID = value.key;
}
}
if (app != null && atm.meta.Contains("za.co.abacus.C_EVENT"))
{
app.ID = atm.content;
}
if (app != null && atm.meta.Contains("za.co.reactor.A_HORIZON"))
{
app.Start = Convert.ToDateTime(atm.content);
}
if (app != null && atm.meta.Contains("za.co.reactor.AA_HORIZON"))
{
app.End = Convert.ToDateTime(atm.content);
}
if (app != null && atm.meta.Contains("za.co.reactor.A_TEXT"))
{
app.Description = atm.content;
}
if (app != null && app.End > app.Start)
{
RadScheduler1.DataStartField = app.Start.ToString();
RadScheduler1.DataSubjectField = app.Subject.ToString();
RadScheduler1.DataEndField = app.ToString();
RadScheduler1.DataKeyField = app.ID.ToString();
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
RadScheduler1.SelectedDate = app.Start;
RadScheduler1.Visible = true;
}
}
}
}
}
catch (ApplicationException ex)
{
}
finally
{
obj.closeSession(SessionKey);
}
}
Now this Function works well and it has no problems , in the debug more, i check the value that is supplied to this function from the page method function its fine. and my JS looks like this
function keyPress() {
var tb = document.getElementById("<%=txtsearchid%>");
if (tb.value.length == 2) {
PageMethods.Getadata(tb.value);
ToggleCollapsePane();
}
return false;
}
and the Toggle function
function ToggleCollapsePane() {
var splitter = $find("RadSplitter1");
var pane = splitter.getPaneById("LeftPane");
if (!pane) return;
if (pane.get_collapsed()) {
pane.expand();
}
else {
pane.collapse();
}
}
so the Getadata() Function will call the Bind_SearchBox() Function and pass the Parameter and the function Bind_SearchBox() will do the Job as you can see at the end it sets some control to visible. But this does not bring me back results(The RadScheduler1 is not binded with data and RadPanelBar1 does not show anything)
I had a search button that is that was calling the same method and passing the same parameters but it could show results and it looked like this
protected void btnSearch_Click(object sender, EventArgs e)
{
RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1");
TextBox txtseach = (TextBox)textItem.FindControl("txtsearch");
if (txtseach.Text != "")
{
Bind_SearchBox(txtseach.Text.Trim());
}
}
In FireFox i get this Error when i debug it
<br />
Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'Getadata' failed with the following error: System.NullReferenceException-- Object reference not set to an instance of an object.
If i click this above button it will show results. The txtseach have the same text and it calls the same method but when i call this function and inject parameters from page method it does not work.
I am Surprised.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified on Tuesday, August 10, 2010 7:05 AM
|
|
|
|
|
First of all this is the question for ASP.NET forum.
Second: it's no surprise that it doesn't work really. What you're trying to do must be accomplished with a postback. You can call your Bind_SearchBox from JavaScript, but Bind_SearchBox will have no way to return its results to the browser. Solution for your problem is to execute postback instead of calling pagemethod. I don't remember parameters exactly, but you have to supply it with id of control, that triggers postback (in your problem this would be a search button). Or maybe you should reconsider your solution and trigger the Bind_SearchBox from additional postback.
I hope, that what I written is more less clear. If not, please ask
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Good Day
I have updated the Post.at the bottom there is an Error that comes back if i debug with Firefox
Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'Getadata' failed with the following error: System.NullReferenceException-- Object reference not set to an instance of an object.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
And did you debug the Bind_SearchBox method when you call it from your javascript? Exception must come from somewhere.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Yes i have debugged it and i realized that when i enter the Function , when it goes to this two lines
RadPanelBar1.Items.Clear();
RadScheduler1.Appointments.Clear();
and this one
RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);
it goes to the finally block and exit the loop. in IE the debug gives me nothing but in Firefox after the Finally then i get the error i sent you.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
The reason exception is thrown is that the View you create doesn't go the regular page lifecycle (I assume the View is your ascx/aspx). Youd didn't call Init, Load or DataBind or whatever event you're filling your controls with data in.
As I said. Try redesign your solution, so it uses postback. Tell me, why you're using javascript and maybe I'll be able to give you a hint.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Good Day
You are Right the View is the Class name of the page aspx and i used javascript because i wanted to handle the keyPress event of the textbox
function keyPress() {
var tb = document.getElementById("<%=txtsearchid%>");
if (tb.value.length == 2) {
PageMethods.Getadata(tb.value, myFunction(tb.value));
ToggleCollapsePane();
}
return false;
}
and take the value that has been entered on key-press and execute the function.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified on Tuesday, August 10, 2010 10:15 AM
|
|
|
|
|
OK, so look at the HTML generated by your site. The textbox, that you have you event attached to should have its change event set. (I assume, the textbox you're fighting with right now is the same.) Set the same value for the keyPress event of the textbox and it should work.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Yes the Textbox is the same.
<br />
Set the same value for the keyPress event of the textbox and it should work.
can my give me an example
Thank you for your help
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|