Dec 17, 2009

solution of system.security.permissions.securitypermissions

system.security.permissions.securitypermissions

whatever we are using paymentgateways, some opensource library's are working in local systems but they are not working in godaddy.com.

if this type issue is faced please chk the following regions

-permissions based,(set the permissions in godaddy)
-Paymentgateway,(all paymentgateway's are not supported)
-CDO mail object,(in godaddy using 'system.web.mail'/smtp mail is used to sending mails)
-some opensource library's(if all permissions have then only u can use)

Errrr: Specified Protocol is unknown

Specified Protocol is unknown.
solution: mention namespace of CDO .it is related to CDO object

Dec 11, 2009

How to zip multiple files in c#,asp.net

using opensource(sharpziplib)
downloading dll in the following link

http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx
add the dll and using the below namespaces


//Namespaces
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Checksums;

code:
Crc32 crc = new Crc32();
ZipOutputStream s = new ZipOutputStream(File.Create(@"c:\newfile.zip"));
s.SetLevel(9); // 0 - store only to 9 - means best compression
ZipEntry entry = null;
String[] str = new String[] { "Ads.xml", "Ads1.xml" };
byte[] buffer = null;
for (int i = 0; i < str.Length; i++)
{
FileStream fs = File.OpenRead(@"c:\" + str[i]);
buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
entry = new ZipEntry(ZipEntry.CleanName(@"c:\" + str[i]));
entry.DateTime = DateTime.Now;
entry.Comment = "test file";
entry.ZipFileIndex = i;
entry.Size = fs.Length;
fs.Close();
crc.Reset();
crc.Update(buffer);
entry.Crc = crc.Value;
s.PutNextEntry(entry);
s.Write(buffer, 0, buffer.Length);
}
s.Finish();
s.Close();

How to set Tabindex in asp.net application

in the Page_Load

page.form.defaultfocus=button.clientid;
page.form.defaultbutton=button.uniqueid;

Dec 9, 2009

Access to the path c :\inetpub\wwwroot\foldername\file is denied

Error: Access to the path c :\inetpub\wwwroot\foldername\file is denied.

Solution: give access permissions in the iis.
steps:
Open c:\inetpub\wwwroot\ur application folder, in that open folder, where ur storing the files.
right click on the folder, select properties option, click security tab.
In that click add button to create 'ASPNET' user and allow all permissions.
and remaining users like(system,iisusers) also allow permissions.

It will work....

Dec 2, 2009

How to Connect our site to paypal

connect our website to paypal site.

it is very easy to connect to paypal.
steps to connect
Create a merchant account in paypal.
open the paypal account with your existing id.
goto my account in that select merchant optioin.
there it showing different types of buttons like(buy,donate,addtocart)
select which one u have to use.
complete the remaining fields. after filling all thefields automatically script will be generated.
Copy the code and paste in ur page.
it works...