web-site-project

Exclude web.config from server when publishing website (not WAP) VS2005

独自空忆成欢 提交于 2019-12-11 10:38:54
问题 How do I exclude Web.config from server when publishing website (not web application project) in Visual Studio 2005 I can see information how to add setting to the Web.Config but in this instance the Web.config is fine on the servers; so I do not want the problem of introducing possible faulty Web.config to a live environment. 回答1: Quite simply. Go to properties of web.config, for 'Build Action' select 'None' and 'Copy To Output Directory' select 'Do Not copy' 来源: https://stackoverflow.com

Running aspnet web site starts on parent directory

廉价感情. 提交于 2019-12-11 06:37:20
问题 I have some old project written in asp.net web pages. I open project by Open Website option and choosing MyCompany folder. I start a project with debugging. The Asp.NET Development server starts. Actual: localhost:53669/MyCompany/somepage.aspx Expected: localhost:53669/somepage.aspx How can I force the ASP.NET development server to start on MyCompany folder location not on the parent folder location? 回答1: What version of Visual Studio are you using? In Visual Studio 2010, you can change it in

Angular html5Mode in Visual Studio website

蓝咒 提交于 2019-12-11 04:29:18
问题 I want to use the html5Mode in a website project on VS2015. The default page is working correctly, but when I use a rout defined on angular, it shows a 404 error. I added the following code on web.config, but it does not seem to work properly <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> My routes on angular look like : .config(function ($stateProvider, $urlRouterProvider, $locationProvider) { $urlRouterProvider.otherwise("/countries")

Reuse code from website project in my web application project

僤鯓⒐⒋嵵緔 提交于 2019-12-11 03:58:13
问题 Here's the code. I now also get errors in codebehind that a variable already exists and method has identical signature, but I cant find those duplicates anywhere in the code behind. .ASPX <%@ Page Title="Mijn oefeningen" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="Fitness2.exercises" Codebehind="exercises.aspx.vb" %> <%@ MasterType VirtualPath="~/main.master" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp

How to publish a full website without compiling and without copying SVN files

自闭症网瘾萝莉.ら 提交于 2019-12-11 01:24:13
问题 Apparently, DNN installations do not like to be precompiled (they won't be able to find any localized strings then). Our installation is safely put in SVN, which means I cannot just copy the whole directory. To publish everything, I need to copy the whole website directory without the SVN files and directories . So far, I've been messing with good old DOS commands, which is time consuming and error prone. Can someone help me to an MS-Built script or step to do just this? Or can I do this

How to setup web.config transformation for website projects?

吃可爱长大的小学妹 提交于 2019-12-11 00:38:13
问题 I have a website project and would like to setup different web.config transformation files for it, but the option doesn't exist when I right-click on the web.config file. Is this option limited to web applications? 回答1: You can use a Web Deployment Project. For the VS 2010 version, see: http://www.microsoft.com/download/en/details.aspx?id=24509 来源: https://stackoverflow.com/questions/8765812/how-to-setup-web-config-transformation-for-website-projects

Can old App_Web.xxxx.dlls affect site behavior?

江枫思渺然 提交于 2019-12-10 18:48:13
问题 I have ASP.NET Web Site project that deploys as precompiled to server. After deploy bin folder contains multiple App_Web.xxx.dll files. I know that I can delete old files before deploying new version but if I don't, can these old files somehow affect web site behavior? How ASP.NET finds that my last version page had compiled to App_Web_aaaaa.dll and App_Web_bbbbb.dll contains old version? Thanks! 回答1: Short answer, yes it can, as you may wind up with namespace conflicts/multiple declarations

extending asp.net control in the website project

我的梦境 提交于 2019-12-10 09:50:24
问题 when I extend an asp.net control and place the extended control class in, say, Applicaton_code (without specifying the namespace) how do i register the control to use it on a webpage? what assembly name and namespace should be specified? 回答1: use : <%@Register TagPrefix="local" Assembly="App_Code" Namespace="Controls" %> Also, you HAVE to defines a namespace where to put your controls (from memory, when adding class to App_code, no namespace is generated by default). namespace Controls {

Publish Profile not working when building website project

試著忘記壹切 提交于 2019-12-10 02:30:14
问题 I recognized that Web Deployment Projects are not supported in Visual Studio 2012 . After reading this article, I tried to get Publish Profiles to work. After installing Visual Studio Web Publish Update I was able to publish web site projects and web application projects with the new publish dialog in Visual Studio 2012 . Because we are using TFS 2010 Team Build I tried to use publish profile via MSBuild parameters. But the following statement only works to publish web application projects.

Exclude files from web site deployment with msbuild

蹲街弑〆低调 提交于 2019-12-09 13:31:47
问题 I have a web site project that I deploy using msbuild. In the project there are some files and folders that are needed for the build (e.g. the web.config part replacement files) but that I don't want to deploy to the target site. The best I could think of is a post-build target that removes these files, but I'd like to know if there is a way to have these files not copied to the output folder. 回答1: You can select the files and set their "Build Action" to "ExcludeFromPackageFiles". That way