|
Thanks for reply,
i have already tried every thing you mentioned above, i turned on/off the credentials, tested the email code in separate application which was working fine there. but when i put it in window service it stops working.
any ideas whats the problem...? am i missing some thing?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
If you got it working in a windows app, but it doesn't work in the windows service the only possibility is the user login you are running the windows service as. Try running the windows service as your login and I am guessing it will work. Which ever login you are using for your windows service (I think you said network service) it doesn't have the correct rights on the PC to do email. If your login works, you should be able to set up a new local or domain user account to run the windows service as. That is normally what I do when I use windows services.
Ben
|
|
|
|
|
Thanks for reply...
I am afraid this is also not the problem...! i am using my own local user account with full rights. if i must set some special account setting/rights then please guide me what to do?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Have you tried running the windows service as your login? If your login works with the windows app, it should cause the windows service to work.
Ben
|
|
|
|
|
Thanks for reply,
I tried both window application and window service on local user account. one more thing just came to my notice that previously this was running fine but few days ago i changed some setting of SMTP to block spams and probably after that this problem startd to occure.
Do you think it is because of change in SMTP settings...? if yes then how can i reset the setting or enable window service to run on new setting?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
So I think you are saying that your windows app doesn't work anymore. I am not sure how you changed your SMTP settings, so I am not sure how to reset them either. If that is what changed then that is most likely what needs to be fixed. Note if you are sending lots of emails to a certain server, you will get marked as a spammer which could also be your problem.
Ben
|
|
|
|
|
|
Well, In which area you are facing problem ? Loading data to the drop down ? Or getting data and binding the grid when drop down changes ? Have you made autopostback=true ? Sending sample code will be easy to understand the problem
|
|
|
|
|
I have managed to load data onto the dropdown, but binding the datagrid when something is selected from the dropdown.
Here is some code from a working vb.net page.
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
con = New OleDbConnection("Provider = Microsoft.Jet.oledb.4.0; data source = C:\TelephoneList.mdb")
con.Open()
'Dim str As String = "Select Branch,[Contact Name], [Telephone Number], [Telephone Extension], [Fax Number], [Fax Extension] from [Other Branches] Where Branch = '" & DropDownList1.SelectedValue & "'"
' Dim con As New OleDbConnection
Dim comx As New OleDbCommand
comx = New OleDbCommand("Select [Contact Name],[Telephone Number], [Telephone Extension], [Fax Number], [Fax Extension] from [Other Branches] where Branch = '" & DropDownList1.SelectedValue & "'", con)
comx.Connection = con
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
'Dim cm As New OleDbCommand(str, con)
GridView1.DataSource = comx.ExecuteReader(CommandBehavior.CloseConnection)
GridView1.DataBind()
If con.State = ConnectionState.Open Then
con.Close()
End If
' ***********Now Im allocating data to the second datagrid
Dim comxx As New OleDbCommand
comxx = New OleDbCommand("Select [Alternative Contact], [Second Alternative], [Alt Telephone], [Alternative Ext] from [Other Branches] Where [Branch] = '" & DropDownList1.SelectedValue & "'", con)
'Dim str2 As String = "Select Branch, [Alternative Contact], [Second Alternative], [Alternative TelNumber], [Alternative TelExtension], [Cell] Where [Branch] = '" & DropDownList1.SelectedValue & "'"
comxx.Connection = con
If con.State = ConnectionState.Closed Then
con.Open()
End If
'con.Open()
'Dim command As New OleDbCommand(str2, con)
GridView2.DataSource = comxx.ExecuteReader(CommandBehavior.CloseConnection)
GridView2.DataBind()
con.Close()
If DropDownList1.SelectedValue = "UNITRANS" Then
lblMessage.Text = "Here Are Other Users For " & DropDownList1.SelectedValue
Dim Comxxx As New OleDbCommand
Comxxx = New OleDbCommand("Select User, Telephone, Notes from [Other Users] where Branch = '" & DropDownList1.SelectedValue & "'", con)
If con.State = ConnectionState.Closed Then
con.Open()
End If
GridView3.DataSource = Comxxx.ExecuteReader(CommandBehavior.CloseConnection)
GridView3.DataBind()
con.Close()
Else
If DropDownList1.SelectedValue = "A.HAK Industrial Services" Then
lblMessage.Text = "Here Are Other Users For " & DropDownList1.SelectedValue
Dim Comxxx As New OleDbCommand
Comxxx = New OleDbCommand("Select User, Telephone, Notes from [Other Users] where Branch = '" & DropDownList1.SelectedValue & "'", con)
If con.State = ConnectionState.Closed Then
con.Open()
End If
GridView3.DataSource = Comxxx.ExecuteReader(CommandBehavior.CloseConnection)
GridView3.DataBind()
con.Close()
End If
End If
End Sub
kagiso
|
|
|
|
|
What error you are getting here ? Are you getting values to all datareader ?
|
|
|
|
|
I don get any values out.I think the connection is a problem aswell
kagiso
|
|
|
|
|
Print your query before executing. Copy the query and execute it directly on your DB and check it is returning value..
|
|
|
|
|
Im gona have to battle to do this tonite and if I still have a problem I will get back to you.
Thanx for your assistance
kagiso
|
|
|
|
|
|
Ok, I managed to come up with this, now can anyone tell me where I went wrong coz when I run the page, i don get any values into the DropDown.
<%@ Language=VBScript %>
<%Option explicit
Dim oRs, conn, connect, strSQL
set conn=server.CreateObject ("adodb.connection")
connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("C:\CFusionMX\wwwroot\Working Site\Home Pagecourses.mdb") & ";Persist Security Info=False"
conn.Open connect
%>
<title>Example combo box
The following was selected : <%=Request.Form ("courses")%>
<%
Set oRs=Server.CreateObject("adodb.recordset")
strSQL = "SELECT DISTINCT CourseName FROM tblCourses ORDER BY CourseName"
oRs.Open strSQL, conn
Do while not oRs.EOF
if Request.Form("courses") = oRs("CourseName") then 'if this is the selected one then display as selected
Response.Write ""
Response.Write oRs("CourseName") & ""
oRs.MoveNext
else
Response.Write ""
Response.Write oRs("CourseName") & ""
oRs.MoveNext
end if
loop
%>
kagiso
|
|
|
|
|
Hi Guys,
I don't know if what's lacking with my source code.
I have a problem about the ID declared within the <LoggedInTemplate></LoggedInTemplate>. And in my aspx.vb code behind the ID that was supposedly be used intead was produced an error - " Webchartviewer1 not declared"
Example Code Below: Error: "Webchartviewer1 not declared"
...
<LoggedInTemplate>
<asp:Panel ID="Panel2" runat="server" BackColor="white"
Width="99%" HorizontalAlign=left>
<asp:chart:WebChartViewer ID="WebChartViewer1" runat="server"/>
</asp:Panel
</LoggedInTemplate>
...
below is aspx.vb code behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
WebChartViewer1.Image = c.makeWebImage(Chart.PNG)
End Sub
hifiger2004
|
|
|
|
|
I am sending some mail by a console program using smtp server..
But in yahoo the mails r going to spam..while the same mail are going to inbox in gmail..
can anyone tell me the reason plzzzzzz.
hiiiiii
|
|
|
|
|
Are you using any authentication ?
|
|
|
|
|
ya I am using authentications...It is going to inboxbox folder of gmail but not in yahooo.????
hiiiiii
|
|
|
|
|
|
mozilla is not supporting my email validation function..
can anyone tell me the reason please???
function CheckEmail()
{
check=1;
var emailtext=document.getElementById('emailtext');
var email = emailtext.value;
var AtPos = email.indexOf("@");
var StopPos = email.lastIndexOf(".");
if ((email == "")||(AtPos == -1 || StopPos == -1)||(StopPos < AtPos)||(StopPos - AtPos == 1)||(AtPos == 0) )
{
Message = "Not a valid Email address" ;
check=0;
}
if(Message=="")
{
mailerror.style.display="none";
}
else if(Message !="")
{
mailerror.style.display="";
}
}
hiiiiii
|
|
|
|
|
In this code where you are referring mailerror. What element is that ? Try getting that element object by getElementById.
hkchauhan wrote: mailerror.style.display="";
What do you mean by this line ? Are you trying to display the element ? Then use display='block'. Put alert line by line, and check. Then you will come to know where the problem is
|
|
|
|
|
Open up the error console so that you see what error message you get.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: Open up the error console so that you see what error message you get.
How we can get the mozilla error console ? I got IE but mozilla I didn't ?
|
|
|
|
|
I don't have the Mozilla suite installed at the moment, so I don't know exactly how you do it in that browser, but in Mozilla Firefox you open the error console from the Tools menu.
---
single minded; short sighted; long gone;
|
|
|
|