图 :【TestWebService】的运行界面
Form vb的代码清单如下:
Public Class Form Inherits System Windows Forms Form#Region Windows 窗体设计器生成的代码 Public Sub New ( ) MyBase New ( )该调用是 Windows 窗体设计器所必需的InitializeComponent ( )在 InitializeComponent ( ) 调用之后添加任何初始化End Sub 窗体重写处置以清理组件列表 Protected Overloads Overrides Sub Dispose ( ByVal disposing As Boolean ) If disposing ThenIf Not ( ponents Is Nothing ) Then ponents Dispose ( )End If End If MyBase Dispose ( disposing )End Sub Windows 窗体设计器所必需的Private ponents As System ComponentModel IContainer注意 以下过程是 Windows 窗体设计器所必需的可以使用 Windows 窗体设计器修改此过程不要使用代码编辑器修改它Friend WithEvents Button As System Windows Forms Button Friend WithEvents Button As System Windows Forms Button Friend WithEvents DataGrid As System Windows Forms DataGrid System Diagnostics DebuggerStepThrough ( )Private Sub InitializeComponent ( ) Me Button = New System Windows Forms Button ( ) Me Button = New System Windows Forms Button ( ) Me DataGrid = New System Windows Forms DataGrid ( ) CType ( Me DataGrid System ComponentModel ISupportInitialize ) BeginInit ( ) Me SuspendLayout ( ) Me Button FlatStyle = System Windows Forms FlatStyle Flat Me Button Location = New System Drawing Point ( ) Me Button Name = ButtonMe Button Size = New System Drawing Size ( ) Me Button TabIndex =Me Button Text = 绑定Me Button FlatStyle = System Windows Forms FlatStyle Flat Me Button Location = New System Drawing Point ( ) Me Button Name = ButtonMe Button Size = New System Drawing Size ( ) Me Button TabIndex =Me Button Text = 修改Me DataGrid DataMember =Me DataGrid Dock = System Windows Forms DockStyle Top Me DataGrid HeaderForeColor = System Drawing SystemColors ControlText Me DataGrid Name = DataGridMe DataGrid Size = New System Drawing Size ( ) Me DataGrid TabIndex =Me AutoScaleBaseSize = New System Drawing Size ( ) Me ClientSize = New System Drawing Size ( ) Me Controls AddRange ( New System Windows Forms Control ( ) {Me DataGrid Me Button Me Button } ) Me Name = FormMe Text = 测试Web ServiceCType ( Me DataGrid System ComponentModel ISupportInitialize ) EndInit ( ) Me ResumeLayout ( False )End Sub#End RegionPrivate Sub Button _Click ( ByVal sender As System Object ByVal e As System EventArgs ) Handles Button Click Dim MyService As New localhost Service ( ) DataGrid DataSource = MyService Binding ( ) DataGrid DataMember = Cust End SubPrivate Sub Button _Click ( ByVal sender As System Object ByVal e As System EventArgs ) Handles Button Click Dim MyService As New localhost Service ( ) Dim ds As DataSet = DataGrid DataSource Dim dsChanges As DataSet = ds GetChanges ( ) If Not ( dsChanges Is Nothing ) Thends Merge ( MyService Update ( dsChanges ) True ) End IfEnd SubEnd Class
六 总结
lishixinzhi/Article/program/net/201311/11839
vb.net编的web程序如何生成并且发布在sever2003服务器上并且用IE浏览器访问什么IIS架构 。晕~~~
1.首先正式版本的发布vb.netweb对象你必须要Release , 不要直接把Debug程序放上去 。
2.将所有的.cs文件删除 。vs.net有一个很方便的工具,“项目——复制项目”就okvb.netweb对象了 。
3.windows server2003上一定要安装了"Internet 信息服务(IIS)管理器",如果没有安装的话可以到“控制面板——添加或删除程序——添加\删除WINDOWS组件——应用程序服务器”如果“应用程序服务器”没有构选的话钩上,放入windows 2003的系统盘安装 。
4.安装完成之后把项目靠到服务器上 。简单一点的方法是右键点击项目文件夹 , Web共享——共享文件夹 。此时就算发布成功了 。不过还有一些细节需要注意 。如:IIS匿名访问等 。那就是另外的问题了 。呵呵 。IIS设置很简单,可以在网上找些资料 。
推荐阅读
- java爬虫的优缺点,java爬虫怎么写
- jquery实现图片信息显示,jquery动态显示图片
- 公众号小程序开发语言,微信公众号小程序语言
- 防疫益智游戏,关于防疫主题的小游戏
- php抓取网页部分数据库 php 获取网页内容
- ERP系统推进表,erp系统项目介绍
- mysql怎么设计数据表,mysql设计数据表仓库管理库存
- 0到3岁动画片益智游戏,36岁益智动画片2020
- php数据分析包 php数据统计分析