asp.netÖÐÓÃsoapheader×÷ÑéÖ¤µÄʹÓò½Ö裺 ºÜ¼òµ¥
Asp.netÒ³ÃæÖе÷ÓÃÒÔSOAPÍ·×÷ÑéÖ¤µÄweb services²Ù×÷²½Ö裺
µÚÒ»²½£ºÓÃÀ´×÷SOAPÑéÖ¤µÄÀà±ØÐë´ÓSoapHeaderÀàÅÉÉú£¬ÀàÖÐPublicµÄÊôÐÔ½«³öÏÖÔÚ×Ô¶¯²úÉúXML½ÚµãÖУ¬¼´£º
<soap:Header>
<UserSoapHeader xmlns="http://tempuri.org/">
<UserName>string</UserName>
<Pwd>string</Pwd>
</UserSoapHeader>
</soap:Header>
public class UserSoapHeader : SoapHeader
{
private string _userName;
private string _pwd;
//publicµÄÊôÐÔ½«×Ô¶¯Éú³Éxml½áµã
public string UserName
{
get { return _userName; }
set { _userName = value; }
}
public string Pwd
{
get { return _pwd; }
set { _pwd = value; }
}
}
µÚ¶þ²½£º
ÔÚWebServices·þÎñÀàÖÐÌí¼ÓÒ»¸öpublicµÄÊôÐÔ(±ØÐëpublic)£¬ÀàÐÍΪ´ÓUserSoapHeader
/// <summary>
/// WebService µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService
{
//´ËÊôÐÔ½«×÷ΪÑéÖ¤ÊôÐÔ
//·½·¨µÄSoapHeaderAttributeÖеÄÃû³ÆÓë´Ë±äÁ¿Ò»ÖÂ
public UserSoapHeader userHeader;
public WebService()
{
//Èç¹ûʹÓÃÉè¼ÆµÄ×é¼þ£¬ÇëÈ¡Ïû×¢ÊÍÒÔÏÂÐÐ
//InitializeComponent();
}
[WebMethod]
[SoapHeader("userHeader")]//ÕâÀïºÜÖØÒª£¬Ãû³ÆÒªºÍ¶¨ÒåµÄÑéÖ¤ÊôÐÔÃû³ÆÒ»ÖÂ!
public string HelloWorld()
&nb
Ïà¹ØÎĵµ£º
ASP.NETÖнøÐÐÏûÏ¢´¦Àí(MSMQ) Ò»
MSMQÊÇ΢ÈíÏûÏ¢¶ÓÁеÄÓ¢ÎÄËõд¡£ÄÇôʲôÊÇÏûÏ¢¶ÓÁУ¿ÕâЩ½éÉÜÍøÉÏÒ»´óƬÕâÀï¾Í²»¶à˵ÁË¡£±¾ÎĶÔÓÚ´óϺ¼¶µÄÈËÎïÀ´ËµÕâÖ»ÊÇСÍæÒâ¶øÒÑ£¬¶ÔÓÚ³õѧÕßÀ´ËµÕâÎÄÕ»¹ÊÇÓÐÒ»¶¨µÄ°ïÖú£¬Ï£Íû·¹ýµÄ´óϺÃDZðЦ»°ÎÒ°àÃÅŪ¸«¡£
Ò»¡¢MSMQ½éÉܺͰ²×°ÏûÏ¢¶ÓÁÐ
&nb ......
http://www.cnblogs.com/wyforumid/archive/2008/05/14/1196155.html
Ê×ÏȶÔÒÔÉϵÄÔ´´Õß˵¶Ô²»ÆðÏ£¬Î´¾Í¬Òâ¾Í¸ÄÁËËûµÄÔ´Â룬»¹°Ñ¸ÄºóµÄÔ´Âë·¢³öÀ´¡£
Ö÷Òª¸ÄµÄµØ·½¾ÍÊǵØÖ·À¸ÀïµÄ¶«¶«ÁË£¬ÔÎÄ¿ÉÒÔ¿´ÒÔÉϵģ¬ÎÒÌùÉÏ×Ô¼º¸ÄºóµÄÔ´Âë°É
Default.aspxÎļþ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="D ......
¡¡¡¡ÓÉÊý¾Ý¿âÇý¶¯µÄWebÓ¦ÓóÌÐò£¬Èç¹ûÐèÒª¸ÄÉÆÆäÐÔÄÜ£¬×îºÃµÄ·½·¨ÊÇʹÓûº´æ¹¦ÄÜ¡£Óû§´ÓÊý¾Ý¿âÖмìË÷Êý¾Ý£¬¿ÉÄÜÊÇWebÓ¦ÓóÌÐòÖÐÖ´ÐÐ×îÂýµÄ²Ù×÷Ö®Ò»¡£ÒòΪÆäÖÐÉæ¼°¶à¸ö»·½Ú£¬ÀýÈ磬Web·þÎñÆ÷¡¢Êý¾Ý¿â·þÎñÆ÷µÈ¡£ÓÈÆäÊÇÔÚÓû§±È½Ï¶à£¬¼ìË÷µÄÊý¾ÝÁ¿±È½Ï´óµÄÇé¿öÏ£¬»á¸ø°üÀ¨Óû§ÔÚÄڵĸ÷¸ö·½ÃæÔì³É²»Ð¡µÄÀ§ÄÑ¡£Èç¹ûÄܹ»½«Êý¾Ý¿ ......
WebÀï¼ÓÈë<sessionState cookieless="false" mode="StateServer" timeout="60" stateNetworkTimeout="3600" sqlCommandTimeout="3600"/>ºó±ØÐ루cmdÀïÔËÐÐ:Net Start aspnet_state£©²Å¿ÉÒÔÉèÖÃsessionÖµ¡£
ÕâÒ»¶Î¾ÍÊÇÅäÖÃÓ¦ÓóÌÐòÊÇÈçºÎ´æ´¢SessionÐÅÏ¢µÄÁË¡£ÎÒÃÇÒÔϵĸ÷ÖÖ²Ù×÷Ö÷ÒªÊÇÕë¶ÔÕâÒ»¶ÎÅäÖÃÕ¹ ......
SQL½Å±¾£º
CREATE TABLE tblBooksUpload
(
¡¡DocID int NOT NULL IDENTITY Primary Key ,
¡¡DocTitle varchar (200) ,
¡¡Doc image,
¡¡DocType varchar (50) ,
¡¡Entrydate datetime Default GetDate()
)
Ê×ÏÈÎÒÃÇҪʵÏÖÓû§ÔÚä¯ÀÀÆ÷¶Ë×ÔÓÉÑ¡ÔñÎļþ£¬È»ºóÉÏ´«£¬ÕâÀïÓû§Ñ¡ÔñÎļþ£¬µ±È»ÊÇÒªÇó±ê×¼µÄWindows·½Ê½£ ......