.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Mysql connector and medium trust shared hosting

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
Hi at all. I've a big problem with GoDaddy Shared Hosting. I've written an ASP.NET application with MySql Database, but my application can't run, with the "Security Exception" error. The problem is that mysql connector must be recompiled with some .... different option. But i can't recompile.. i got always error. So i'm asking you if someone have a link for a mysql connector version able to run in medium trust environment.Very Thanks in advance.Bye

View Complete Post

More Related Resource Links

linq not working on shared server with Medium Trust security


On my PC everything is all rigth but on the webserver I get an error: 'OrderBy' is not a member of 'System.Array', maybe due to the trust level.
Is there I way to bypass this or I have to resign myself to it?

Do You Trust It?: Discover Techniques for Safely Hosting Untrusted Add-Ins with the .NET Framework 2


When you allow your application to run arbitrary code through an add-in, you may expose users to unknown code, running the risk that malicious code will use your application as an entry point into the user's data. There are several techniques you can use to reduce the attack surface of your application, which Shawn Farkas discusses here.

Shawn Farkas

MSDN Magazine November 2005

mysql data source provider - mysql connector/net

Dear All, I having problem installing mysql connector/net 6.2.3 on my vsd 2010 because the installed went smoothly but when Im trying to use the mysql on data source provider, I cant see it on the list and when try to install/change the connector the visual studio integreation has an x mark meaning to say it was not installed on my vsd2010.  Thanks.

online shared hosting sql server problem

 hi all             how to solve the problem in online sql server. A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)thank u

Medium Trust and OleDbPermission unrestricted=true

 Hi,can anybody enlighten me what holes i punch when i extend the medium trust policies with OleDbPermission unrestricted=true?I want to read Excel files and need to change "Data Source" and "ExtendedParameters", so i do not want to restrict things further. Is it possible to access devices, services or files outside the web application root with this configuration?   Thanks     (mk)

MVC2 Could not load file or assembly 'xxxx.Models' shared hosting

Hello,I have an mvc2 site that runs fine locally but when i deploy it to my shared hosting account i keep getting this error.Could not load file or assembly 'AppMVC2.Models, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.I have run Reflector againts the dll to see what dependencies the dll has, I then took each one of the dependant dlls and set them to copy local in the project and deployed them all to the shared hosting account even ones that should be on the server like System.Web. except for mscorlib.dll, but i still get the error.I have also tried to bin deploy and deploy the code files and get the same error.I have seen people write about fusion log but i don't see any examples on how to get this running on shared hosting.Just wondering does anyone else have any recommendations on how to track down the source of this problem?

How to detect mysql connector version programatically?

Hi experts,Can I programatically find the version of mysql .net connector on the host machine from asp.net and update my web.config accordingly?Thanks in advance.

MySql connector/net problem


I have a asp.net 4.0 site that can't connect to my hosting company's Mysql server

im using Mysql connector/net 6.3.4 also installed on host server.
i can run the site from my dev server or from my web Hosts server. as long as the connection string host name points to my dev mysql server ....all is good work great.
i have also tried using another company's hosted mysql server... everything works good.

all three databases were created from same dump file...

all three Mysql servers are v5

It would seem to me that my web site code is good.

whenever i change the server host name in the web.config file back to my hosting company's mqsql server i get this error.

This is the error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unable to initialize provider.  Missing or incorrect schema.

Source Error:

Line 50:         <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
Line 51:      &nbs

Email Errors to mailbox in shared hosting environment


Is there a way to email any error message a user recieves to a mailbox.

Basically if the user recieves one of the asp.net error pages is there a way for that message to be emailed to a mailbox for me to look into?

It is on a shared hosting environment.

Any help?

managed IIS7module +.Net 4.0 integrated pipeline + Medium Trust Level +GAC


I'm developing a managed module for IIS7. Assembly with my code is placed in GAC and worked fine within 2.0 pipeline...  

But with .NET 4.0 pipeline (and Medium Trust Level chosen) there are no permissions to read registry and code is unable to read/write "C:\Program Files\<Folder>\MyAppConfig.file"

Is there any way to grant my assembly with proper permissions to do this?

Can sqlce4 ctp2 run in medium trust level?



I am using SQLCe4 ctp2, but when my application run in medium trust level. It will throw a security exception shows :


Cannot perform CAS Asserts in Security Transparent methods

Exception stack trace is:


[InvalidOperationException: Cannot perform CAS Asserts in Security Transparent methods]
 System.Security.CodeAccessSecurityEngine.CheckNReturnSO(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 create) +0
 System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark) +61
 System.Security.CodeAccessPermission.Assert() +28
 System.Data.SqlServerCe.KillBitHelper.GetKillBit() +231
 System.Data.SqlServerCe.KillBitHelper..cctor() +56

[TypeInitializationException: The type initializer for 'System.Data.SqlServerCe.KillBitHelper' threw an exception.]
 System.Data.SqlServerCe.KillBitHelper.ThrowIfKillBitIsSet() +0
 System.Data.SqlServerCe.SqlCeCommand..cctor() +5

[TypeInitializationException: The type initializer for 'System.Data.SqlServerCe.SqlCeCommand' threw an exception.]
 System.Data.SqlServerCe.SqlCeCommand..ctor() +0
 _Default.Page_Load(Object sen

Report Viewer on a GoDaddy Shared Hosting Account


I contacted GoDaddy and they informed me that their Shared Hosting accounts only allow partial trust and Report viewer requires Full Trust and therefore I cannot use Report Viewer on my website. (nor do they know of any report tool that will work on their site)

I just have a hard time believing that of all the accounts on Godaddy that NO ONE is running any kind reports, I can see some uses for databases with no reporting needed, but not as many as need reporting.


So....Just a quick question, has anyone been succesful with a report tool that will work on GoDaddys shared hosting environment ?





Making website 'medium trust' compliant


My web hosting provider re-configured their servers for 'medium trust' overnight and now my ASP.NET website will not run. All they will tell me is that it needs to be set for 'medium trust' and will not advise beyond that. I inserted <trust level="Medium" /> between the <system.web> tags in the web.config file but that hasn't fixed the problem. I'm using the auto-generated web.config file from Visual Web Developer for ASP.NET 3.5, and don't believe I'm doing anything out of the ordinary as far as violating 'medium trust' restrictions. Has anybody else had to deal with this problem? If so, please help!

GetCompiledPageInstance Issue on shared hosting


Hi all,

I was wondering if anyone could help me with this problem I am having.

I am using friendly URLs in my .net 3.5 website, and this uses the GetCompiledPageInstance method in the PageParser class to work.

This all works a treat on my localhost, but as soon as I upload this to my shared hosting (with 1&1) I get this error

System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I have done loads of Googling and found that this is due to me needing to turn Full Trust mode on. However, this is something that is not allowed on shared hosting.

Does any one know of a workaround for this 'GetCompiledPageInstance' method, or another method I could use? Is there another way of doing Friendly URLs without this?


How to create Umbraco database on shared hosting.

The article How to create Umbraco database on shared hosting. was added by codenickel on Monday, March 21, 2011.

I had to create Umbraco database on my shared hosting (I am using Winhost at the moment) couple of days ago. After checking few examples on Umbraco forum, I came up with my own quick solution which works like a charm. Here is how I do it, hope it will

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

Individual field - MySQL



I was wondering how to recieve an individual field from my MySQL database.

I have been able to get a row, but what I am trying to do is get a name from my database and set it into the HeaderText in my DataGrid.

The way I am trying to do it at the moment is

using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
                formDataGrid.Columns[0].HeaderText = cmd.ExecuteReader(
                    CommandBehavior.CloseConnection |

This doesn't seem to get a value from the GetValue, but if use

using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
                formDataGrid.DataSource = cmd.ExecuteReader(
                    CommandBehavior.CloseConnection |

it will bind my data into the grid.

I just want to be able to change the HeaderText in the first coulmn of the DataGrid from one table and have the DataGrid be filled from another table.

I can fill the DataGrid its just changing the HeaderText that I am having trouble with.

Any help?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend