#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

128 lines
3.8 KiB

<?xml version="1.0"?>
<Template originator = "Jusin Dearing"
created = "06/09/2006"
lastModified = "06/09/2006">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.WebService.Name}</Name>
<Category>C#</Category>
<Subcategory>ASP.NET</Subcategory>
<Icon>C#.Project.Form</Icon>
<Description>${res:Templates.Project.WebService.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename = "Default.asmx" />
<Open filename = "Soap.cs" />
</Actions>
<Project language = "C#">
<ProjectItems>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
</ProjectItems>
<PropertyGroup>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup configuration="Debug">
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup configuration="Release">
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<Files>
<File name="Soap.cs" DependentUpon="Default.asmx"><![CDATA[${StandardHeader.C#}
using System;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace ${StandardNamespace}
{
[WebService]
public class Soap : System.Web.Services.WebService
{
/// <summary>
/// Logs into the web service
/// </summary>
/// <param name="userName">The User Name to login in as</param>
/// <param name="password">User's password</param>
/// <returns>True on successful login.</returns>
[WebMethod(EnableSession=true)]
public bool Login(string userName, string password)
{
//NOTE: There are better ways of doing authentication. This is just illustrates Session usage.
UserName = userName;
return true;
}
/// <summary>
/// Logs out of the Session.
/// </summary>
[WebMethod(EnableSession=true)]
public void Logout()
{
Context.Session.Abandon();
}
/// <summary>
/// UserName of the logged in user.
/// </summary>
private string UserName {
get {return (string)Context.Session["User"];}
set {Context.Session["User"] = value;}
}
}
}
]]></File>
<File name="Default.asmx" language="XML"><![CDATA[<%@ WebService Language="C#" Class="${StandardNamespace}.Soap,Soap" %>]]></File>
<!--*************************************************************************-->
<File name="Web.config" language="XML"><![CDATA[<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm ">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>]]></File>
<File name="Properties\AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" />
</Files>
</Project>
</Template>