|
hello friends,
i am using excel report in asp.net. my excel report is working fine when run within cs file. when publish the project to run on iis the show error. object refrance not set.
|
|
|
|
|
That means something you assumed would never be null, is null. Perhaps because Excel is not on the server ? I am obviously guessing, no-one could actually pinpoint the error without seeing the code that is throwing the exception.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Server Error in '/WebSetup4' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Anyone having any idea ???
|
|
|
|
|
As the error messsage is saying there is error in the application
to see the specific error make the custom Error mode off in web.config
<customErrors mode="Off"/>
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hello all,
I am having one difficulty. I am developing a website. On my home page i am having some article and in need that these article should move contentiously in a div tag (like marquee tag moves but marquee tag move horizontally i need it to be move vertically) and on mouse over of any link they should stop moving. How should i implement this. Please guide me.
Thanks
Rahul
SOLVED
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Monday, August 11, 2008 7:56 AM
|
|
|
|
|
You should write a javascript function which will control the scrolling of the content
|
|
|
|
|
Hi Manas,
Can u provide me any sample code?
Thanks
Rahul
SOLVED
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Monday, August 11, 2008 7:56 AM
|
|
|
|
|
From the documentation of the SmtpClient class:
If there is an e-mail transmission in progress and you call SendAsync or Send again, you will receive an InvalidOperationException.
Does that mean users can't send mail (from different threads) at the same time?
Also is there any way to get notified 'programmatically' when the mail is delivered?
Thanks
|
|
|
|
|
Waleed Eissa wrote: Also is there any way to get notified 'programmatically' when the mail is delivered?
SendAsyc has an event that fires when it has sent. It's not very reliable, you can't know it was delivered, only that it was sent.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Thanks a lot for your reply, actually I know about this event but I was hoping there's a more reliable way, basically what I'm trying to do is automate the whole process, this is why I don't want to use DeliveryOptions because I don't want to keep checking my email every now and then to make sure every message was sent, doesn't seem a very reliable way in a production environment. It seems that there's no way to communicate with the SMTP server, I wonder how all those websites with high traffic handle mail issues ..
|
|
|
|
|
No, there is literally no way to know if a mail got sent correctly, your best bet is to write a program that checks mail on the return address to see if you get a failure notice, but even that won't really work.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi
I have used the following tutorial to create an autocomplete extender.
The problem is, it is not working. When I type text in the box nothing happens.
Is there something missing from the exampl code I have used.
I'm not sure where the string value gets filled which is shown in the tuturial.
Any help would be great
thanks!
http://www.aspdotnetcodes.com/AutoComplete_From_Database.aspx
|
|
|
|
|
I think problem is in webservice.I had case like you and when I added third line (of lines down below) it worked.
Try this:
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[System.Web.Script.Services.ScriptService]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Thanks for the reply, but that didnt work.
Below is my code for extender control
<asp:textbox id="tb_description" runat="server" xmlns:asp="#unknown">
<atlas:autocompleteextender id="AutoCompleteExtender1" minimumprefixlength="1" runat="server" xmlns:atlas="#unknown">
<atlas:autocompleteproperties targetcontrolid="tb_description" servicemethod="GetactdescInfo" servicepath="~/autocomplete.asmx" enabled="True">
Is there anything wrong with that?
|
|
|
|
|
this work for me and I am using in VS.NET 2005
<asp:ScriptManager id="ScriptManager1" runat="server"><br />
</asp:ScriptManager><br />
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtTo"<br />
ServicePath="WebService.asmx" Enabled="true" MinimumPrefixLength="1" ServiceMethod="MethodNameFromWebService"><br />
</cc1:AutoCompleteExtender>
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
OK, well there must be a problem with the web service then
The code is displayed below.When I type text in the box nothing appears
thanks
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class autocomplete : System.Web.Services.WebService {
[WebMethod(EnableSession = true)]
public string[] GetactdescInfo(string prefixText)
{
int count = 10;
string project = HttpContext.Current.Session["project"].ToString();
SqlConnection connectionString = new SqlConnection(ConfigurationManager.ConnectionStrings[project].ConnectionString);
connectionString.Open();
string sql = " SELECT description" +
" FROM act" +
" WHERE description like '" + prefixText + "' ";
//string description_condition = " AND description LIKE '%" + prefixText + "%'";
//sql += description_condition;
SqlDataAdapter dataAdapter1 = new SqlDataAdapter(sql, connectionString);
dataAdapter1.SelectCommand.Parameters.Add("@prefixText", SqlDbType.NVarChar, 2000).Value = prefixText + "%";
DataTable datatable1 = new DataTable();
dataAdapter1.Fill(datatable1);
string[] items = new string[datatable1.Rows.Count];
int i = 0;
foreach (DataRow datarow in datatable1.Rows)
{
items.SetValue(datarow["description"].ToString(), i);
i++;
}
return items;
}
}
|
|
|
|
|
.netman wrote: " WHERE description like '" + prefixText + "' ";
try to add precentage sign:
" WHERE description like '" + prefixText + "%' "
My webservice which works:
<%@ WebService Language="C#" Class="WebService" %><br />
<br />
using System;<br />
using System.Web;<br />
using System.Web.Services;<br />
using System.Web.Services.Protocols;<br />
<br />
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[System.Web.Script.Services.ScriptService] <br />
<br />
public class WebService : System.Web.Services.WebService {<br />
<br />
[WebMethod]<br />
public string[] GetUserName(string prefixText)<br />
{<br />
<br />
System.Data.DataSet dtst = new System.Data.DataSet();<br />
<br />
System.Data.SqlClient.SqlConnection sqlCon = new System.Data.SqlClient.SqlConnection("Data Source=.;Initial Catalog=BussinesTube;Integrated Security=True");<br />
<br />
string strSql = "SELECT name+' ' +lastname +' ; < '+ username + ' > 'as [name] from users WHERE [name] LIKE '%" + prefixText + "%' ";<br />
<br />
System.Data.SqlClient.SqlCommand sqlComd = new System.Data.SqlClient.SqlCommand(strSql, sqlCon);<br />
<br />
sqlCon.Open();<br />
<br />
System.Data.SqlClient.SqlDataAdapter sqlAdpt = new System.Data.SqlClient.SqlDataAdapter();<br />
<br />
sqlAdpt.SelectCommand = sqlComd;<br />
<br />
sqlAdpt.Fill(dtst);<br />
<br />
string[] cntName = new string[dtst.Tables[0].Rows.Count];<br />
<br />
int i = 0;<br />
<br />
try<br />
{<br />
<br />
foreach (System.Data.DataRow rdr in dtst.Tables[0].Rows)<br />
{<br />
<br />
cntName.SetValue(rdr["Name"].ToString(), i);<br />
<br />
i++;<br />
<br />
}<br />
<br />
}<br />
<br />
catch { }<br />
<br />
finally<br />
{<br />
<br />
sqlCon.Close();<br />
<br />
}<br />
<br />
return cntName;<br />
<br />
}<br />
<br />
<br />
<br />
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Hi thanks for the response.
I have added that and it still doesnt work.
Should there be any additonal lines in my c# code for the page the textbox is on?
|
|
|
|
|
When does prefixtext get set?
|
|
|
|
|
hi i am new user of asp.net using c#
problem is that i use a mater page which fill a datalist in iframe tag so open a new page and then goes to second page now when i click a datalist link button then i open a new mater page but that page is open on same td of mater page how i show a new page. every time when i clik on linkbutton its open in new datalist as a child of that form. while i want its open in a seprate page.
thanks in advance reply soon.
|
|
|
|
|
You try to open if in a parent page.
studing is processing in this life.
|
|
|
|
|
i understood what is the problem.
problem is that i am using iframe control but if i not use ifrmae than all value are comeout from my div tag what i use insted of iframe
thanks
|
|
|
|
|
hello
i am using master form.
and so how to write webform name on internet exlorer title bar.
pls help me.
gayatri
Gayatri
|
|
|
|
|
when u insert a form using mater page then u should chnge the <title>your web page name
example
]]>
i think its helpful for u.
|
|
|
|
|
Page.Title="Here goes title of the page";
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|