为什么"我得到无法生成的SQL Server&QUOT的用户实例;在.NET 4中,而不是.NET 2? [英] Why do "I get Failed to generate a user instance of SQL Server" with .NET 4 and not .NET 2?

查看:119
本文介绍了为什么"我得到无法生成的SQL Server&QUOT的用户实例;在.NET 4中,而不是.NET 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的本地计算机上的Visual Studio创建与targetframework 4使用默认模板(一个与CSS问题就在这里解决了<一个简单的网站href=\"http://stackoverflow.com/questions/3897781/google-maps-api-in-asp-net-masterpage-why-it-stays-blank\">http://stackoverflow.com/questions/3897781/google-maps-api-in-asp-net-masterpage-why-it-stays-blank)

I have created on my local machine with targetframework 4 in visual studio a simple website using the default template (the one with css problem solved here http://stackoverflow.com/questions/3897781/google-maps-api-in-asp-net-masterpage-why-it-stays-blank)

我上传到这是第一次配置.NET 2我的IIS 7服务器,以便在web.config中我删除行

I uploaded it to my IIS 7 server which was first configured for .NET 2 so in web.config I deleted the line

<compilation debug="false" targetFramework="4.0" />

,以便它可以在.NET 2运行

so that it can run on .NET 2.

在此之前,这是很好。

然后我ISS7编辑我的网站使用.NET 4,当再次测试该网站,我得到这个错误:

Then I edited in ISS7 my website to use .NET 4. When testing the site again, I got this error:

Failed to generate a user instance of SQL Server due to 
failure in retrieving the user's local application data path.

我没有告诉过你,我没有安装任何SQL Server却又那么此消息可能是正常的,但为什么我没有使用.NET 2怎么做呢?我可以配置.NET 4的东西,使这个错误被忽略像.NET 2?

I hadn't told you that I didn't install any sql server yet so this message may be normal but why didn't I get it with .NET 2 ? Could I configure something in .NET 4 so that this error is ignored like on .NET 2 ?

推荐答案

这是相当困难的了解你在做什么,为什么

It is rather difficult to understand what you are doing and why

我没告诉你,我没有安装任何SQL Server呢。

的Visual Studio(VS)安装SQL Server前preSS(默认配置,供本地使用,远程应该启用),但IIS7,ASP.NET或Windows不

Visual Studio (VS) installs SQL Server Express (configured, by default, for local use only, remote one should be enabled) but IIS7, ASP.NET or Windows doesn't

我有我的本地计算机上的Visual Studio创建与targetframework 4使用默认模板一个简单的网站

如果你创建了一个项目瞄准ASP.NET4.0,你不能在ASP.NET 2.0中运行它(你可以做到这一点反之亦然,从而在2.0中创建4.0上运行)

If you created a project targeting ASP.NET4.0, you cannot run it with ASP.NET 2.0 (you can do it vice versa, to run in 4.0 created for 2.0)

哪个默认模板?他们是在VS配置后或VS安装过程中

Which default template? They are configured in VS after or during VS setup

无法生成SQL Server的用户实例

"Failed to generate a user instance of SQL Server"

在VS2010目标4.0,你没有上载机上ASP.NET项目创建期间创建的SQL Server实例的用户(您可以检查文件夹和文件的ASP.NET成员资格使用SQL Server用户实例创建)。它们不是针对项目2.0创建

User instance of SQL Server is created during ASP.NET project creation in VS2010 targeting 4.0 which you do not have on uploaded machine (you may check that folders and files for ASP.NET membership are created using SQL Server USer Instance). They are not created by project targeting 2.0

什么是创建ASP.NET 4.0项目的意义,然后测试它在ASP.NET2.0机?创建它从临时目标2.0。

What is the sense of creating ASP.NET 4.0 project and then test it in ASP.NET2.0 machine? Create it targeting 2.0 from the scratch.

- 更新:结果
这就是所谓的后向兼容的通用软件的原则 - 软件知道,可容纳为previous(2.0 3.0,1.0,1.1),但不为未来的差异(2.0 4.0)结果
http://en.wikipedia.org/wiki/Backward_compatibility

您可以创建项目针对2.0及更高版本上更改为4.0,或者如果你是不舒服不使用Visual Studio的。

You can create project targeting 2.0 and change for 4.0 later on or do not use Visual Studio at all if you are uncomfortable with it.

这篇关于为什么&QUOT;我得到无法生成的SQL Server&QUOT的用户实例;在.NET 4中,而不是.NET 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆