.net framework data provider error - visual-studio-2010

what is this error(comes up when i test my project)
-->
Unable to find the requested .Net Framework Data Provider. It may not be installed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1402071
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +67
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +22
System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +11
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +117
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
This is the Configuration
<configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="DataSource=C:\ProgramFiles\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CIEDB.sdf;Password=sa;Persist Security Info=True"
providerName="Microsoft.SqlServerCe.Client.3.5" />
<add name="ConnectionString2" connectionString="Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf"
providerName="Microsoft.SqlServerCe.Client.3.5" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>

You probably have to set up the correct configuration information (connection strings) in the test project's .config file
Edit: with that config, I did some searching and came across this forum thread:
http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/ff731bf4-1f50-4f77-955b-e4534474a271/
Where the apparent accepted answer was:
I fix my issue by manually install
SSCEVSTools-Enu.msi from Vs SP1.
There were a few other results on Bing that may be useful as well. Hope it helps

I had this same error when I installed Visual Studio 2010 SP1, then rolled back after I found out it was not so great (major understatement... stay far away from VS2010 SP1). I found online that I could fix this by reinstalling the and I got that file from here. After the reinstall of that software, i started VS 2010 and everything was back to normal. Hope it works for you.
Here is the link I used to get that package:
http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCEVSTools-ENU.msi

From your description, I assume the connection string is invalid. One easy way to create a working connection string is the following:
Create a new, empty text file on the desktop
Change its file extenstion to .udl
Double click on it. This opens the connection wizard.
Configure the connection. Then click on TEST. If the connection succeeds, close the wizard
Open the .udl file in a text editor. It contains a valid connection string.
Copy the connection string from the text editor into your Visual Studio data source string.

Related

Installation 2SexyContent in Dnn Portal (dnnSoftware)

When I install 2sxc in DnnSoftware in recent versions I got the following error message.
My provider has SQL Server switch to "czech_CI_AS" I canĀ“t this change to US-language.
Does anyone have advice?
SqlDataProvider
Info Created - SqlDataProvider\00.99.00.SqlDataProvider
Info Executing 00.99.00.SqlDataProvider
Info Start Sql execution: 00.99.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.
SqlClient.SqlException (0x80131904): Your SQL installation is non-standard
using a Custom Object Qualifier. 2sic uses the standard Microsoft Entity
Framework which doesn't work well with this feature - installation aborted.
**Changed language setting to us_english**. at System.Data.SqlClient.
SqlConnection.OnError(SqlException exception, Boolean breakConnection,
Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.
OnError(SqlException exception, Boolean breakConnection, Action`1
wrapCloseInAction) at System.Data.SqlClient.TdsParser...
You seem to have installed DNN with a custom "qualifier". The default is dbo but the install dialog allows you to change it. it's an old feature meant to "share" a sql for multiple customers. 2sxc can't be installed in this setup - sorry :(

Running an MVC Project on godaddy plesk file io error

I have an MVC web project that I am trying to host on godaddy using plesk for administration. My hosting settings for my web page is httpdocs\WebApplication18\WebApplication18/
I have pointed my web project to my configuration file inside WebApplication18.
Folder access to my files look like this:
Home Directory -> httpdocs -> WebApplication18 -> WebApplication18
-> views -> home -> Index.cshtml
-> web.conf
I am trying to browse to my index.cshtml page. I have set the root to run at WebApplication18 where
my configuration file is stored.
When I type in my hostname inside my address bar I recieve a file IO error that states:
Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +36
System.Security.CodeAccessPermission.Demand() +48
System.Web.HttpRuntime.get_AppDomainAppPath() +53
System.Web.WebPages.Deployment.PreApplicationStartCode.StartCore() +119
System.Web.WebPages.Deployment.PreApplicationStartCode.Start() +39
To begin with custom error mode was turned on, which I turned off in ASP.Nets
settings. I also commented out the compiler error in the web.conf file, which
reduced the error to a file io error.
The question I had was how can I point to my web page properly in my hosting settings
using mvc so that I can render my index.cshtml page using plesk on a godaddy server?
How am I able to fix this error message? I tried changing all of the permissions
lowered the CAS trust level and it makes no difference to the level of control
I have over my web page.
When I do a File Zilla upload sometimes I receive a certificate, but I just ignore
it and select ok.
This is only permission issue. Please kindly ask your provider to give full permission for you. It will fix your issue.

Error in using RoleEnvironment to get Configuration

my web app is using MVC3 with razor
If I am trying to read anything from ServiceConfig using RoleEnvironment.GetConfigurationSettingValue("senderName")
I am getting error related to Microsoft.IdentityModel
Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.Serialization.SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +4727747
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +1725
System.AppDomain.get_Id() +0
<CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie) +185
<CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) +328
<CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +102
[ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
]
.
It's true that I am making use of Windows identity foundation for Azure acs authentication .But everything worked fine when I deployed to azure.But if I make use of RoleEnvironment to read any settings from my ServiceConfig files (for ex :RoleEnvironment.GetConfigurationSettingValue("Smtpserver")) .Its failing on azure .
But everything workes fine on my local azure appfabric .If I am removing this line of code ,then all workes fine .RoleEnvironment.GetConfigurationSettingValue("Smtpserver"))
I am using two webroles in my cloud app.
Please help me identify the cause of error
How did you installed the WIF on the Azure?
The most reliable way is to have the WIF runtime installed via a startup task. You check out this question here. And I think this one is exact duplicate.

Umbraco installation problem. Can not install starter kit. The key was not present in the dictionary

This is a problem I get when trying to install Umbraco. I know that Umbraco has its own forum, but they have just moved it to another url, and I can not seem to be able to post a question there. So I try here. I know this problem has been reported before, and have tried to implement the solutions other people have reported. But I still can not seem to get it working. I have tried to both use Windows installer, as well as setting up the site myself. Last week I managed to create a site, and install a starter kit. But now I can not make it work. No idea why. I do the exact same steps as last week. I have .NET 4.0, IIS 7 and Windows 7. The Umbraco version is the latest (4.7).
No matter if I use Windows installer, or the binary-package from Codeplex, the installation process works fine until the step when I am presented the choice of installing a starter kit. I press for example the Business Startkit, but then I get the error below. I have given full permission for my application folder in inetpub, to IIS_IUSRS, Network service and Network. I have done the same for C:/Temp folder (as suggested by someone). I am using an app-pool that runs on .NET 4.0 in Integrated mode. I also set it to use Network service. I have also tried to both start off with a blank database, as well as creating a new one. The database gets populated with tables. The folder in inetpub is also filled with all the folders and files that should be there. I have also tried using SQL CE, but with out luck. And I do have a working internet connection.
Does anybody have any ideas on how to solve this? It's getting really frustrating. I think I have tried all the suggestions in the other threads, but I might have misunderstood something, missed some steps, or forgotten some advice. Any suggestions are highly appreciated.
The error I get:
Server Error in '/site_development' Application.
The given key was not present in the dictionary.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[KeyNotFoundException: The given key was not present in the dictionary.]
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2258321
umbraco.cms.businesslogic.datatype.controls.Factory.GetNewObject(Guid DataEditorId) +108
umbraco.cms.businesslogic.datatype.DataTypeDefinition.Import(XmlNode xmlData) +459
umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +187
umbraco.presentation.install.steps.Skinning.loadStarterKits.SelectStarterKit(Object sender, EventArgs e) +416
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +113
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
________________________________________
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
Are you able to install Umbraco firstly without the starter kit?
If so it maybe an issue with the starter kit itself.
Or get the latest nightly build from Umbraco here http://nightly.umbraco.org/

Storage scopes cannot be created when _AppStart is executing

Using ASP.NET MVC 3.0 with Visual Studio 2010 (Pre-SP1 and with SP1) and ASP.NET Development server I get the error "Storage scopes cannot be created when _AppStart is executing." every time I debug. When I wait a couple seconds and refresh the browser it works as expected.
Does this happen to everyone?
Is there a way to prevent it?
Should I be concerned about this in production? (IIS 6/7 hosting)
Related work-item #7828 on codeplex has no official responses.
Full stack trace:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Storage scopes cannot be created when _AppStart is executing.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Storage scopes cannot be created when _AppStart is executing.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Storage scopes cannot be created when _AppStart is executing.]
System.Web.WebPages.Scope.AspNetRequestScopeStorageProvider.set_CurrentScope(IDictionary`2 value) +83361
System.Web.WebPages.Scope.ScopeStorage.CreateTransientScope(IDictionary`2 context) +95
System.Web.WebPages.Scope.ScopeStorage.CreateTransientScope() +76
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +84
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862381
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
While I'm not sure why this happens (I also can't reproduce this) I might have some fixes that you might try. The WebPageHttpModule (in System.Web.WebPages) is supposed set AppStartExecuteCompleted but it doesn't, and that's why you get an exception (All this guess work is based on that).
So... Looking around the source code I BELIEVE that the source of this bug is something fishy with the Web Development Server and PreApplicationCode + dynamic registration of a module (WebPageHttpModule). The Module init should ALWAYS run at the application start, but for some reason I GUESS that it doesn't. Maybe someone can somehow test it.
Some fixes that I thought about (again, this is pure guess work as I can not reproduce this).
1) try to register the WebPageHttpModule module statically in the WebConfig. update I've tested this, and this doesn't throw an exception. However, it registers TWO httpmodules.
2) According to the comments on that thread you've linked it appears that this doesn't happen on IIS, so I would try to run under IIS Express (under VS 2010 SP1).
As I said before, this is just guess work. There could be other reasons for module not to run... Such as the Web Server not restarting properly, including some problem with the PreApplicationCode, or not resetting s_appStartExecutedLock to false in the HttpModule, or something wierd with the HttpContext.Items which could ALSO cause the module not to run...
This seems to still be a problem, certainly using the MVC 3 template on VS 2010 SP1. For anyone still having the problem, I found the solution on the following blog post to work quickly and reliably:
http://www.codinghub.net/2012/12/storage-scopes-cannot-be-created-when.html
I just had this happen for the first time on my project...and also can't reproduce. But I have a theory:
In a lapse of thinking, I had declared a static dictionary object within a helper class, and not too long after recompiling I got this error. This is my declaration:
private static Dictionary<string, string> FormatList = new Dictionary<string, string>();
Since static variables are shared across the entire web app (not just the context of the request), I'm thinking the constructor for the dictionary was getting triggered while App_Start was executing. This makes sense to me...since App_Start is probably setting up all of the session and application storage. If a static variable gets constructed before the storage is set up...boom goes the dynamite.
Just wanted to toss that theory out there...maybe it's the cause...maybe it's not. But it's something worth looking into (since statically declared objects like that are dangerous.)
Disconnect the Database. It cannot be re-created when a connection is active.
Thanks.
Simple rebuild solution helped me: please try to clean and rebuild (not sure "Microsoft" released MVC3 with any heavy bug)

Resources