Hi,
Another alternative is to create a setup project that you can hand to your
testing team. In this way they can merely run your setup and all the required
files will be installed. Should you want the setup to also create the IIS
virtual directories so that your web service is ready for a client
application then here is some code that you could use. This should be run on
the project installers "AfterInstall" event so that you have the install
directory.
Dim IISSchema As System.DirectoryServices.DirectoryEntry = Nothing
Dim CanCreate As Boolean = False
Dim PathCreated As Boolean = False
Dim IISAdmin As System.DirectoryServices.DirectoryEntry = Nothing
Dim VDir As System.DirectoryServices.DirectoryEntry = Nothing
Try
IISSchema = New System.DirectoryServices.DirectoryEntry("IIS://"
& sWebSite & "/Schema/AppIsolated")
CanCreate = Not
IISSchema.Properties("Syntax").Value.ToString.ToUp per() = "BOOLEAN"
If CanCreate Then
Try
IISAdmin = New
System.DirectoryServices.DirectoryEntry("IIS://" & sWebSite & "/W3SVC/1/Root")
If Not System.IO.Directory.Exists(sPath) Then
System.IO.Directory.CreateDirectory(sPath)
PathCreated = True
End If
'If the virtual directory already exists then delete it
For Each VD As System.DirectoryServices.DirectoryEntry
In IISAdmin.Children
If VD.Name = sAppName Then
IISAdmin.Invoke("Delete", New String()
{VD.SchemaClassName, sAppName})
IISAdmin.CommitChanges()
Exit For
End If
Next VD
'Create and setup new virtual directory
VDir = IISAdmin.Children.Add(sAppName, "IIsWebVirtualDir")
VDir.Properties("Path").Item(0) = sPath
VDir.Properties("AppFriendlyName").Item(0) = sAppName
VDir.Properties("EnableDirBrowsing").Item(0) = False
VDir.Properties("AccessRead").Item(0) = True
VDir.Properties("AccessExecute").Item(0) = True
VDir.Properties("AccessWrite").Item(0) = False
VDir.Properties("AccessScript").Item(0) = True
VDir.Properties("AuthNTLM").Item(0) = True
VDir.Properties("EnableDefaultDoc").Item(0) = True
VDir.Properties("DefaultDoc").Item(0) =
"default.htm,default.aspx,default.asp"
VDir.Properties("AspEnableParentPaths").Item(0) = True
VDir.CommitChanges()
'INPROC = 0
'OUTPROC = 1
'POOLED = 2
VDir.Invoke("AppCreate", 1)
Return True
Catch Ex As Exception
If PathCreated Then
System.IO.Directory.Delete(sPath)
End If
End Try
End If
Catch ex As Exception
' Error handling
Finally
IISSchema.Dispose()
End Try
"Sinex" wrote:
Hi,
I've developed my web service using VS.net 2005 and .net 2.0.
I am able to test my service on my own PC. Now I need to give it to the
testing team wherein they will test it on a clean PC.
What are the files I need to give to the testing team? On my PC, in IIS I
dont see any exe. Only the asmx and the code behind files are there.
I dont want to be giving out my code....so what do I do?
Sinex