简体   繁体   English

MS Stack:如何将本地开发环境与服务器环境匹配?

[英]MS Stack: How to match Local Development Environment to Server Environment?

So I'm fairly new to the MS Stack Development world and facing problems with having different local development environment vs the server environment(I assume it was same, and boy was I wrong). 因此,我对MS Stack Development领域还很陌生,并且面临着本地开发环境与服务器环境不同的问题(我认为这是相同的,而我错了)。

My setup is a Windows 7 64bit using Visual Studio 2012(IIS7.5), and the server is MS Server 2012 (IIS8). 我的设置是使用Visual Studio 2012(IIS7.5)的Windows 7 64位,服务器是MS Server 2012(IIS8)。

The MS Server 2012 doesn't recognize the way I get Active Directory user Login and also the way I use SQLDataSource in asp.net. MS Server 2012无法识别我获得Active Directory用户登录的方式以及我在asp.net中使用SQLDataSource的方式。

I'm thinking it be could the way I setup the server? 我在想这可能是我设置服务器的方式吗? Or is my coding doesn't work from IIS7.5 to IIS8? 还是我的编码从IIS7.5到IIS8不起作用? There could be so many things that could go wrong. 可能有太多事情可能出错。 I could use some direction on this. 我可以为此使用一些指导。

My current app that uses: 我当前使用的应用程序:

UserPrincipal userPrincipal = UserPrincipal.Current;
            givenName = userPrincipal.GivenName;
            login = userPrincipal.SamAccountName;

And it's throwing an error in the server. 而且它在服务器中引发了错误。

Also in the web.config there's tons of errors the in the server and every error resolved leads to another error. 同样在web.config中,服务器中还存在大量错误,解决的每个错误都会导致另一个错误。

Now it's giving this error: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. 现在,出现此错误:在应用程序配置中找不到连接名称'LocalSqlServer'或连接字符串为空。

And that's after fixing another error with this: 那是在解决另一个错误之后:

<clear/>

It keeps on going and doesn't stop... Am I in over my head or do I just resolve one error at a time? 它一直在继续,并且不会停止……我是不是头顶脑子还是一次只能解决一个错误? Maybe there's some serious incompatibility with developing in VS 2012 and deploying it in IIS8.0 2012 MS Server? 可能与VS 2012中的开发以及在IIS8.0 2012 MS Server中的部署存在严重的不兼容性?

So I resolved this by just dealing one error at a time. 因此,我一次只处理一个错误就解决了这一问题。 It was mostly the connectionstring issue. 主要是连接字符串问题。

I had to use <clear /> then fixed my connectionstring to support sql server 2000. 我必须使用<clear />然后修复我的connectionstring字符串以支持sql server 2000。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 存储库仅在本地开发环境中获取数据 - Repository fetching data only in local development environment 为Umbraco建立本地开发环境 - Setting up local development environment for Umbraco 如何为 ASP.NET 和 C# 设置体面的本地开发环境 - How to set up decent local development environment for ASP.NET and C# 在测试环境中出现Fluent NHibernate ToFuture错误,但在本地开发中却没有 - Fluent NHibernate ToFuture error in test environment but not in local development 不在azure服务器上工作但在本地环境中工作正常吗? - Not working on azure server but works fine in local environment? C#开发环境 - Development environment for C# 我如何在本地环境中工作的托管环境中删除Cookie? - How to remove cookie in Hosted environment, which i works in local environment? 在实时环境中修补MS-SQL-Server数据库 - Patch an MS-SQL-Server database in live environment 开发环境设置-使用C#Web服务和MS SQLServer的iPhone iOS - development environment setup - iphone iOS using C# web services and MS SQLServer 如果网站在服务器上并且Lync在本地用户环境上,我如何使Lync Client运行? - How do I get Lync Client working if website is on Server and Lync is on local user Environment?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM