首页 > 其他分享 >Web Profile Builder for Web Application Projects

Web Profile Builder for Web Application Projects

时间:2023-11-08 11:02:18浏览次数:41  
标签:Profile Web name Builder project Application file

Web Profile Builder for Web Application Projects

Files can be downloaded from the Web Profile Builder project page.

If you use Web Application Projects, you have probably run into the issue of not being
able to access the Profile at design time.

Thankfully, some nice people created an Add-In for Visual Studio 2005 that will generate
a wrapper class as a workaround.  That project can be found here.  I wanted to contribute
to the Web Profile Generator project, but my emails went unanswered.  I decided to start
a new project.

This project picks up where that one left off and is based on their source code.  I started
out rebuilding that project as it stood to add support for Visual Studio 2008.  I got it to
work, but I wanted to do more. 

I decided to go ahead and address the issues listed on the original project site.

Here is a summary of the changes made.

  • First of all, this is no longer an Add-In.  Instead, it is a Build Task.
  • Works for Visual Studio 2005 and 2008.
  • Added ability to set the file name.
  • Added ability to set the directory the file gets created in.
  • Added ability to set the class name.
  • Added ability to set the name space.
  • Added an extra method as requested here.


Usage:

  1. Run the installer.
  2. Add this Import statement to your project file.  (see special notes below)
    <Import Project="$(MSBuildExtensionsPath)\WebProfileBuilder\WebProfileBuilder.targets" />
  3. Done.

The profile will get generated every time you build the project.


Special Notes:

After you modify the project file by adding the import statement, you will get this security
warning when the project loads.  Choose the "Load project normally" option and press OK.
 


Extended Usage:

If you want to customize the web profile, you can add the following sections to your web.config.

This section needs to be at the top of the file just under the opening configuration tag.

<configSections> 

    <sectionGroup name="robo.webProfile"> 

        <section name="webProfileSettings" 

          type="WebProfileBuilder.WebProfileConfigurationSection,
WebProfileBuilder, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=01d50f1f82943b0c" 

          allowLocation="true" 

          allowDefinition="Everywhere"/> 

    </sectionGroup> 
</configSections>This section can be anywhere under the configuration section. 
<robo.webProfile> 

    <webProfileSettings className="MyWebProfile" 

                        nameSpace="CustomNameSpace"  

                        directory="CodeFiles" 

                        fileName="MyWebProfile" /> 
</robo.webProfile>

The directory name is not a virtual directory, but is in reference to the root of the Web Application.
The fileName is just the name of the file and should not include an extension.
The className and nameSpace are as you would expect.
None of these settings are required.  You don't even need to define this section at all.


If you would like to use Web Profile Builder, it can be downloaded here.
Also available is the complete source code and examples in VB and C#.


Thanks
-Joe

Published Feb 03 2008, 03:21 AM

by robolize

Filed under: ASP.NET, Profile, WAP, Web Application Project


ref:

http://www.codeplex.com/WebProfile/Release/ProjectReleases.aspx?ReleaseId=5460

http://code.msdn.microsoft.com/WebProfileBuilder

http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx















标签:Profile,Web,name,Builder,project,Application,file
From: https://blog.51cto.com/emanlee/8246685

相关文章

  • .net core webapi Startup services.AddHttpClient
    staticpublicclassCreditScoreServiceExtension{staticpublicvoidAddCreditScoreQueryServiceHttpClient(thisIServiceCollectionservices,IConfigurationconfig){services.AddSingleton<ICreditScoreQueryService,CreditS......
  • x-admin-web
    1 解压 vue-admin-template-master2 改名:x-admin-web3 openprojectbyIDEA:  D:\idea_code\demo_qinqin_11014  npminstall--registry=https://registry.npm.taobao.orgview-->apperance--->toolbar 勾选 配置configuration npm -Local:http://loca......
  • 从零开始构建报警中心:part04 钉钉消息-webhook
    现在工作上比较常用的IM一般式钉钉企微飞书,其实使用起来都是大同小异的。这里就用钉钉来实现。使用钉钉发送信息,一般有三种形式群webhook工作通知智能机器人智能机器人方式,能实现一定的交互功能,但逻辑相对复杂,这里只是需要一个实时的钉钉消息,所以不进行讨论。添加群webhook这是一......
  • IApplicationBuilder详解
    在上节中我们已经得知WebApplication实现了IApplicationBuilder,我们浅谈了其pipe特质和构建方法,本节中将深入了解ApplicationBuilder以窥探IApplicationBuilder真相publicinterfaceIApplicationBuilder{IServiceProviderApplicationServices{get;set;}I......
  • beego框架 golang web框架-网上花店
    beego框架golangweb框架-网上花店beego网上花店功能介绍主页商品列表展示商品详情用户登录注册购买购物车评价用户中心订单列表后台管理页商品管理添加修改删除商品用户管理添加删除用户网上花店功能比较简单适合刚接触beego的初学者使用技术beego框架My......
  • .netCoreApi5.0+部署iis站点webconfig配置 HTTP 错误 500.24 - Internal Server Error
     <?xmlversion="1.0"encoding="utf-8"?><configuration><locationpath="."inheritInChildApplications="false"><system.webServer><handlers><addname="aspN......
  • Asp.Net Core webapi+net6 使用资源筛选器(过滤器) 做缓存
    写一个特性类,用来做标记[AttributeUsage(AttributeTargets.Method)]//只对方法有效publicclassResourceFilterAttribute:Attribute{}我这里使用了MemoryCache来做缓存,也可以使用字典来做,但一定要加上static,否则字典每一次请求都会new一个实例,缓存的东西就丢了private......
  • js实现webSocket客户端
    var ws= new WebSocket("ws://localhost:8080/msg");//readyState属性返回实例对象的当前状态,共有四种。//CONNECTING:值为0,表示正在连接。//OPEN:值为1,表示连接成功,可以通信了。//CLOSING:值为2,表示连接正在关闭。//CLOSED:值为3,表示连接已经关闭,或者打开连接失败//例如:if......
  • web概述
    JavaWeb课程目标1、如何去部署一个tomcat,如何启动tomcat2、如何把一个web项目部署到tomcat中3、tomcat与idea结合使用web概述JavaWeb概述web开发是基于请求和响应的:请求:浏览器(客户端)向服务器发送信息响应:服务器向浏览器回送信息请求和响应是成对出现的。web资源分类......
  • 异常详细信息: System.Web.HttpException: 服务器太忙
    HTTP双连接限制HTTP规范表明,一个HTTP客户端与任一服务器最多可以同时建立两个TCP连接。这可以防止单个浏览器在浏览某个页面(例如,具有120个嵌入的缩略图)时,由于连接请求过多而使服务器负载过重。此时,浏览器将仅创建2个连接,然后通过这两个管道开始发送120个HTTP请求,而......