|
dboy221 wrote: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure my be caused by the fact that under the default settings SQL server does not allow remote connections. (provider: Sql Network Interfaces, error 26 - Error Locating Server/Instance Specified.
This error seems like your Sql Server 2005 is configured to not to access remotely. To setup it do the following:
1. Open SQL Server Management Studio, login with Administrator Userid (Preferably "sa").
2. Right Click the SQL Instance in the Object Explorer and choose the Properties.
3. Properties Dialog would open.Choose Connections in Page List.
4. Check Allow remote connections to this server check box.
5. Click OK.
Thats it.
|
|
|
|
|
|
Hi Michael,
I attempted to modify the the web config file with a the custom SQL membership provider, but still received the error. Are there any other solutions that may assist with this? I have asked my hosting solution provider to look into the issue as well. I know that they have an instance of sql server 2000 on their server, but no express 2005.
|
|
|
|
|
dboy221 wrote: I have asked my hosting solution provider to look into the issue as well
I think this is the best thing. Because the most of hosting providers does have the documentation about how to connect the database in their hosts.. The hosting that I used before never install the database on their webserver. They used to have the seperated database server .....
|
|
|
|
|
Thanks. My hosting provider explain to me that they actually have an instance of SQL Express 2005 running on a separate server. I'll upload my .mdf file to that server and use the necessary credentials for my connection string.
|
|
|
|
|
Hi All,
I want to export to Excel from gridview. I have implemented it.
But if there is paging in gridview, it export only the rows on the particular page.
I want to Export All Rows of all pages.
for example I have 50 records and page size is 10. then there will be 5 pages
10 records per page. if I will export from page 1 then only 10 records will be export.
I want to export All 50 records once.
I use this code to Export to excel :
protected void ExportGridView(Control grdView, string strFileName)
{
string strfName = Server.UrlPathEncode(strFileName);
string attachment = "attachment; filename=" + strfName + ".xls";
Response.ClearContent();
Response.Buffer = true;
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/unknown";
System.Web.HttpContext.Current.Response.Write("<meta http-equiv=Content-Type content='text/html; charset=utf-8'>");
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
grdView.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
Plz Help me.
|
|
|
|
|
If you have the dataset that hold all 50 records, you can generate the excel file by using Microsoft Excel object library.
OR
$unil Dhiman wrote: grdView.RenderControl(htw);
Instead of doing like that, I think you should loop though the dataset that has all 50 records.
|
|
|
|
|
|
I have been hosting my web site with godaddy for about 6 month now (shared hosting). Recently, I am experiencing a huge delay when sending emails (45 min or more). I tried contacting their support and this was their response:
Unfortunately, when messages are sent from scripts on a Windows shared hosting account, there should be a 30 minute to an hour delay. I apologize for any inconvenience this may cause. Let us know if we can help you in any other way.
First of all my application is not a script, it is ASP.NET application,
second of all I definitely did not expect that kind of answer.
My application must be able to interact with user via email and that kind of a delay is completely intolerable.
When I called their support I was put on perpetual hold... I am pretty mach fed up with GoDaddy...
Does anyone else have similar issue with GoDaddy.
Can anyone suggest another non expensive reliable host?
|
|
|
|
|
I have found that emails can be pretty slow, I just implimented them last night. One suggestion - use a different mail server to the one they provide. It's their mail server that is the bottleneck, surely ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Chris.
Thanks for reply. It is definitely their mail server.
I thought of installing an email server on my home PC but that means that I'll have to relay my messages through my ISP and when someone looks at the email and discovers that I am using "Rogers" (local provider) it will seem unprofessional.
Do you know any other strategies to tackle this issue? I honestly think to move to another hosting provider. I had way to many issues with GoDaddy.
|
|
|
|
|
How would someone work out what server the email went through, without doing a lot of digging ?
What issues ? We're just starting with them
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sergeyv2002 wrote: Does anyone else have similar issue with GoDaddy.
I heard a lot of people has the problems with GoDaddy.
sergeyv2002 wrote: Can anyone suggest another non expensive reliable host?
For windows host, I love DiscountASP.NET. Their service is really great.. For Linux host, I'm currently using DreamHost.
|
|
|
|
|
Hi guys,
I'm having a problem with deleting a cookie in internet explorer. I've got some code that calls the Response.Cookies[CookieName].Expires = DateTime.Now.AddYears(-30); line to try to delete a cookie.
This works fine in Firefox and Safari (haven't tried any others) but it just doesn't work at all in internet explorer 7. I'm really at a loss as to why this is. Any ideas?
I've also tried creating a new cookie with a negative expiration date that has the same name as the old cookie but this doesn't work in IE either (works fine in firefox and safari again).
Thanks
Finn
FinnG -
|
|
|
|
|
1. did you delete the cookie? I think you don't need to minus off 30 years for deleting the cookie. you can just minus 1 day to make the cookie expired.
Example ~
if ( Request.Cookies["UserSettings"] != null )<br />
{<br />
HttpCookie myCookie = new HttpCookie ("UserSettings");<br />
myCookie.Expires = DateTime.Now.AddDays (-1d);<br />
Response.Cookies.Add (myCookie);<br />
}
Ref: How to: Delete a Cookie [^]
2. Make sure both cookies (the one you already created and the one that you added to clear the cookies ) are in the same path.
|
|
|
|
|
I am new to ASP.Net. I worked very little with ASP.Net1.1. Now I am learning 2.0. I have created simple 3 pages application and stored in my local drive. The files aspx and aspx.cs are there in my local. Now I would like to open my application to develop more. How can I do that? Like in asp.net1.1, I used to have a .sln file. If I click the file it used to load the entire application in VS 2003.. Please do tell me how can I open my existing application and work more? Thank you.
Vasini
|
|
|
|
|
You need to use Open Website to open it. By default, .NET 2 doesn't include the solution files for Web Site solutions.
|
|
|
|
|
Click File Menu-> Open -> Web Site.
Then Click The File System icon and Choose the your File Folder.
|
|
|
|
|
Seems like you are new here. If you want to reply the vasini's post, you should click "reply" link under the vasini's post. Now, your post looks like replying Pete O'Hanlon's post.
|
|
|
|
|
|
Hello. This isn't a dating site you know.
|
|
|
|
|
But it *could* be....
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Go on then you smooth talker.
BTW - has the CD arrived yet?
|
|
|
|
|
"I am using MultiView / View controls which change by MenuItem clicks. Each view has a GridView on it with Edit and Insert features bound with <b>SqlDataSources</b>
The problem is: when the edit button is clicked, the GridView disappears and you need to click on the MenuItem again to see it (it happens evrytime you click edit, update, cancel or insert buttons on the GridView)."
Solution Suggested:
In Page_load -
if (!Page.IsPostBack){
//Getting the data from database
//Bind the data to Gridview
// Add this datasource to cache or session (e.g. Cache["mydata"]= dsProject.Table[0]; )
}
else{
//Re-bind the gridview with datasource from cache. (e.g. GridView1.DataSource = (DataTable)Cache["mydata"]
}
<u>To Michael Sync:</u> Hi Michael - the problem is Im using SqlDataSources with the GridViews not DataSets. If I want to change them - it will be lot of changes. Any other suggestions?
Thanks.
Ekjon
|
|
|
|
|
Member 4700225 wrote: To Michael Sync: Hi Michael - the problem is Im using SqlDataSources with the GridViews not DataSets. If I want to change them - it will be lot of changes. Any other suggestions?
1. Can you check whether the GV got disappeared or not without using MultiView Control? Just want to make sure what the problem is. I think it will work.
2. If your gridview works okay without multiview, it might be MultiView1.SetActiveView problem. Can you check whether your the EnableViewState property of MultiView and the views which are in MultiView are true or not. (Ensure that you have checked each and every views.)
|
|
|
|