asp.net打包布署

39 篇文章 0 订阅

 只备忘一些容易出错的地方

 

1.快捷方式用 configWeb.dll 来创建

 

 

If Not FoundIt Then
                Throw New InstallException("web.Config 文件没有包含数据库的连接字符串设置")
            End If
            XmlDocument.Save(FileInfo.FullName) '保存配置文件

            '创建桌面的快捷方式
            Dim urlFile As String = String.Format("{0}\于诚物业租赁系统.url", Me.Context.Parameters.Item("targetdir"))
            Dim fStream As System.IO.FileStream = New System.IO.FileStream(urlFile, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write)
            Dim nr As String
            nr = "[DEFAULT]" & Chr(13) & _
                "BASEURL=http://localhost/" & VirtualDir & "/default.aspx" & Chr(13) & _
                "[InternetShortcut]" & Chr(13) & _
                "URL=http://localhost/" & VirtualDir & "/default.aspx" & Chr(13) & _
                "Modified = AE359B07-1B28-424C-8617-169D4E8B3574"
            Dim buffer() As Byte
            Dim encoder As New System.Text.ASCIIEncoding()
            ReDim buffer(nr.Length - 1)
            encoder.GetBytes(nr, 0, nr.Length, buffer, 0)
            fStream.Write(buffer, 0, buffer.Length)
            fStream.Close()

 

2. 新建一个空白的文件命名为 于诚物业租赁系统 , 打包时添加到web应用程序文件夹时,会自动加上.url

   右键选择此文件,创建快捷方式 。把快捷方式拖到用户桌面栏。可以把后面的快捷方式字样去掉

 

3. 给快捷方式换个图标, 打包OK

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值