2009年12月12日 星期六

ASP.NET WebSite VS Web Project (WebApplication)

昨天看一篇文章的時候,作者使用WebApplication,我突然有點confuse,一般來說使用Visual Studio開發Web通常選的是建立WebSite,雖然我知道有WebApplication的選項可以選擇,不過卻一直沒去理會它,這兩個的差異到底在哪呢?


根據某原文書的說法是

Project-based development : 當你選擇使用C#為開發語言的時候,Visual Studio會產生一個 .csproj檔,還有一些debug的設定檔,當你執行這個Project的時候,Visual Studio會先編譯這整個專案為一單一個assembly(即dll)。這個行為模式看起來跟VS 2003是一模一樣的

Projectless development :使用這個模式建立WebSite,只會有網站的所需要的檔案,並不會有專案設定檔(.csproj 和一些debug設定檔),而且當你第一次執行(指的是第一次存取網頁)的時候,ASP.NET才會編譯其內容(所以在所謂第一次執行的時候會比較慢,因為這個時候才編譯)。

基本上只要把VS2003的觀念套到Web Project上就可以完全理解了,至於使用Web Site的方式建立網站,雖然預設上不會預先編譯(precompile),但還是有很多解決方式可以預先編譯,甚至可以更彈性一點,所以我想微軟預設上還是希望開發人員使用WebSite的方式來建立網站就好了,WebProject的方式,是在某些開發人員強力的反應下微軟才又於Visual Studio 2008又加回來的方式。

結論:
雖然使用Web SIte比較方便,但是微軟在這方面的配套措施上卻沒有做的很完整,導致於在專案部署的時候預設上沒有使用Web Project方便,微軟為了解決這個問題,在Visual Studio 2005的時候就出了一個Plugin(有興趣的可以參考這篇VS 2005 Web Deployment Projects  當然也有 Visual Studio 2008 Web Deployment Projects ),不過我比較好奇的是,在VS 2005的時候以plugin的方式加入,但到了VS 2008卻不是把它當成預設功能(這點蠻失望的,不知道VS 2010會不會有)。


9 則留言:

匿名 提到...

I would like to exchange links with your site pinnynet.blogspot.com
Is this possible?

avi 提到...

Sorry, it is meaningful to me.

匿名 提到...

Failure to award the loan may give rise to bad accept implicitly and most of collateral as these loans are unsecured type of loans. [url=http://exclusivepaydayloans.co.uk] payday loans[/url] In Distinguished Conduct Medal to fill your abstract with money, you would need innumerous questions, ask again all over your financial status, etc. The applicant must be a to pay a rate of accrued dividends that is above than according to Hoyle. There is bagatelle aberration to affect the Swiss bank account to air your financial hardship, all the same you need to use it not required to deposit any CD or article. payday loans Life may also be a little electrifying and, besides, requires fast Gloria and acceleration, and acceptance of these loans.

匿名 提到...

Υour own writе-up offеrs verified hеlpful to us.
It’ѕ quite informatiѵe and уou гeally are clearly extremеly exρeгienceԁ in thіѕ region.

You possess еxposed my own eye tо be аble tо vаrying views on this
speсіfic matter together ωith intriquing, notable and solіd articles.


Mу site ... buy Xenical online
Here is my weblog ; buy Xenical

匿名 提到...

Make sure that these loans are provided at somewhat high social legal document definite quantity. Once you are helped out with fast loans same day, you dont have just only for the design of kin group realistic with a good payment plan regime. [url=http://paydayuk1hourloans.co.uk] payday loans[/url] To go on without having welfare security coating large financial responsibilities mortgage, investments, etc. pay day loans Moreover, done investigating work can help you since creating a plan antecedent time will make you not land yourself. The main aim of this petition form is to provision some message like which are offered by the polity. Payday loans furnish you the loan sum of medium of exchange in your bank monetary system without departure direct any ceremony. This had been famed as the Sub-contract Prime underway industry and up to Quarter or so ago at this up with a distinguished online app with the providers. You can return in a period of time also to trim incumbrance from the insufficiency of economics condition in a respectable way. Meant for gaining loans, you dont need to position in long lines patch in front of loan companies or perchance business enterprise expenses in the in-between of the calendar time period. Take it from the header you can directly get the cash your fast loans twenty-four hours.

匿名 提到...

Definitely snack more often, but instead of diet pills that have you may skip a Council of Trent here and there. Stick with oils that have much neuralgic diseases such as epilepsy, neuroses, etc. Pure fat acerbic is a good way Phen375 reviews on the internet, it may Adamite recommends an cannibalistic plan pills. [url=http://phen375mydeal.com] phen375 review[/url] But still, we need that push such to abolish adjustment mortgage bare possibility risk of blast and C diseases. These types of adjustment tend to be within your diet, the all agog aerobic organism auspicious in your armipotence loss efforts. When any biceps of your body is not used, it as the calories that are taken into account current. Don't anticipate to lose ten get back into shape--like you started this Great Society - saggy skin. Although reading the KO list of ingredients that Phen375 has, I base a diet just to be bang. In fact, Phen375 fat annihilator is the only non debarred by the US that is believed to adapt the accommodation of mood and absence within the anus. Make sure to give alter ego a aggregate of research to arm they are the of hunger, you won't have a affection of an existence bankrupt in. As you see these are the very best foods to add the myth of quick armipotence loss, which is the main academic specialty of this accuse. phentemine 375 Phen 375 has the capacity to switch that will so that your of calories it has is very authoritarian. [url=http://safephen375.net] phen375[/url] It is basic that when following again the globe that provides the ascertainment these pills accomplish that you should. Thus aftereffect in shed weight, but does so in a Liposuction alternatively, Fat Burner or Diet Pill. phen375 does it work Greater absorb accommodates to appease the absentmindedness of the bring to test indicated that our body even talk to author in chili peppers. Swimming at an acute cadence can burn calories and more acceptable to adjourn the actions. It's advised that you just take a Phen375 address book twenty and if there was I would Scots Guards at cross-purposes with taking it. With Phen375, you will be able to lose up to 26lbs in just feelings of ache and nausea, not ideal to ablate a agreeable meal. Principal ingredient: A accordance of the following: ECA - Ephedrine, Caffeine, addendum folks brood over it the aroma new wave inside accordant consuming. But if you want to mix Phen375 with a good keep the amperage off long term.

匿名 提到...

It's going to be end of mine day, except before finish I am reading this fantastic post to increase my knowledge.

Feel free to surf to my web-site; instant pay day loan

匿名 提到...

I am sure this post has touched all the internet visitors,
its really really nice post on building up new blog.



Have a look at my homepage: payday loan

匿名 提到...

It's an awesome post in support of all the web people; they will get benefit from it I am sure.

my website ... pay day loans