Friday, January 29, 2010

Code for sending sms from C# using way2sms api

Before Write a code use the steps given below

1. Add Web References to your page.
In that web references page just type this "http://www.spiritssoft.com/webservice/sendway2sms.asmx" in url optoin and click go

After Added that

2. use the name space Using com.spiritssoft.www

3. create a object for sending a sms
SendWay2Sms Objsms_send = new SendWay2Sms();

4.write the code given below here

Note: If you send to a single number just write the code what given here.If you want to send more than one person use comma(,) to seperate the numbers.


For sending one number:

String Strsms_result=Objsms_send.sendSmsSpiritsSoft("UserName", "Password", "Number", "message");

For sending more than numbers:

String Strsms_result=Objsms_send.sendSmsSpiritsSoft("UserName", "Password", "Number 1,Number 2,Number 3", "message");

Thursday, January 28, 2010

Coding for Accessing Sub Directory file with authentication mode as Forms using a web config file

IF u have a single Folder you should write the given code below

Code in a Web Config Root File

Note: when u use this code Just ignore to type Double quotes with the tags.

"<" configuration ">"
"<" location path="Your first sub directory folder Name" ">"
"<" system.web ">"
"<" authorization ">"
"<" allow users="*" "/>"
"<"/ authorization ">"
"<"/ system.web ">"
"<"/ location ">"
"<"/ configuration ">"

If you have more than one folder write the code given below

"<" configuration ">"

"<" location path="Your first sub directory folder Name" ">"
"<" system.web ">"
"<" authorization ">"
"<" allow users="*" "/>"
"<"/ authorization ">"
"<"/ system.web ">"
"<"/ location ">"

"<" location path="Your Secondary sub directory folder Name" ">"
"<" system.web ">"
"<" authorization ">"
"<" allow users="*" "/>"
"<"/ authorization ">"
"<"/ system.web ">"
"<"/ location ">"

"<"/ configuration ">"