I was getting an error saying the .Net provider could not be found when attempting to connect to a MySql db in hosted environment. If the MySql.Data.MySqlClient is not loaded in the GAC on the hosted server, you will need to add a reference in your web.config, if you want to use the SqlDataSource control.
web.config - make sure the version matches your MySqlClient version
<system.data>
<DbProviderFactories>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.2.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
If you are trying to keep your About window in sync with the published version in ClickOnce, rather than the assembly version, you can reference My.Application.Deployment.CurrentVersion. However, this only works on the installed application, not in Visual Studio.
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Deployment.CurrentVersion)
Else
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
End If
If the data source is a DataReader object, you must cast e.Item.DataItem as type DBDataRecord (from System.Data.Common) in the event handler. If the data source is a DataTable, you must cast e.Item.DataItem as type DataRowView.
In Windows 2003, all webservice extensions are “Prohibited” by default.
You need to enable ASP .net extensions to resolve the issue:
1. Open up IIS manager or, from your Run command, type inetmgr and press enter.
2. Expand the appropriate nodes in the IIS to locate the “Webservice Extensions” Node
3. Click on the same.
4. You will find a list of “prohibited” extensions in the right.
5. Click on ASP.NET and “allow” it
In order to use the standard response.write method of exporting to excel, you need to force AJAX to make a full postback. Otherwise, parsing errors occur.
To force a postback, assign a control to a trigger and put the export logic in the control click event or in the page.ispostback portion of page_load.
I was having a problem on a shared server with authenticated users getting logged out every couple of minutes. Turned out to be a simple fix by configuring a static machinekey for the web.config. By default, the authentication key is autogenerated by IIS each time the asp .net process cycles, which can be often on a shared machine.
I put together a fairly simple chunk of code to display a loading image while a chart was rendering. This used an updatepanel and timer. It ran fine with IE6/7 locally and IE7 remote. But IE6 would not display the image on the remote server. Just a blank page and then the chart.
I looked at a lot of different posts and finally came to the solution. It looks like AJAX will automatically compress output. IE7 can handle this, but IE6 can not. By disabling the default compression, the image now appears in IE6 on the remote server.