It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

Problem :- 

It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

Solution :-



This Error Cause Because of your Diffrent Asp.Net  framework running on a same Application pool.
to resolve this error assign diffrent application pool to diffrent framework.
In past i uploaded my Site on Server with IIS 6.0 Version.there are around 15 application running on Framework 1.1.I have uploaded my Framework 2.0 application And I found that 1.1 framework application goes Down.then i show in Event viewer it's dispaly that "It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process"
Then i have create seperate application pool for my asp.net 2.0 application and All Issues are resolved.
  Enjoy !!!!!!!!!!!!



Prev Post                    All Post                           Next Post

Posted in | 6 comments

Error 103 property 'FullResourceName' cannot be declared 'Overrides' because it does not override a property in a base class.

Error :-

Error 103 property 'FullResourceName' cannot be declared 'Overrides' because it does not override a property in a base class.

Solution :-


Remove Overrides keyword in Property.

THis Cause Problem :-

  Public Overrides Property ResourceName() As String
        Get
            Return "rpt_offence_summary.rpt"
        End Get
        Set
            'Do nothing
        End Set
    End Property

Make Like :-


  Public Property ResourceName() As String
        Get
            Return "rpt_offence_summary.rpt"
        End Get
        Set
            'Do nothing
        End Set
    End Property

Posted in | 1 comments

Strong Encryption and Decryption Class For Asp.Net


Hello,
I Have Found Strong Encryption and Decryption Class For encrypt and Decrypt login and Password in .Net Application during googleing.
Strong Encryption and Decryption Class For Asp.Net

For Decryption

public string Decry(string TextToBeDecrypted)
{
RijndaelManaged RijndaelCipher = new RijndaelManaged();
string Password = "CSC";
string DecryptedData;
try
{
byte[] EncryptedData = Convert.FromBase64String(TextToBeDecrypted);
byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
//Making of the key for decryption
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
//Creates a symmetric Rijndael decryptor object.
ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream(EncryptedData);
//Defines the cryptographics stream for decryption.THe stream contains decrpted data
CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
byte[] PlainText = new byte[EncryptedData.Length];
int DecryptedCount = cryptoStream.Read(PlainText, 0, PlainText.Length);
memoryStream.Close();
cryptoStream.Close();
//Converting to string
DecryptedData = Encoding.Unicode.GetString(PlainText, 0, DecryptedCount);
}
catch
{
DecryptedData = TextToBeDecrypted;
}
return DecryptedData;
}


For Encryption
public string Encry(string TextToBeEncrypted)
{
RijndaelManaged RijndaelCipher = new RijndaelManaged();
string Password = "CSC";
byte[] PlainText = System.Text.Encoding.Unicode.GetBytes(TextToBeEncrypted);
byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
//Creates a symmetric encryptor object.
ICryptoTransform Encryptor = RijndaelCipher.CreateEncryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream();
//Defines a stream that links data streams to cryptographic transformations
CryptoStream cryptoStream = new CryptoStream(memoryStream, Encryptor, CryptoStreamMode.Write);
cryptoStream.Write(PlainText, 0, PlainText.Length);
//Writes the final state and clears the buffer
cryptoStream.FlushFinalBlock();
byte[] CipherBytes = memoryStream.ToArray();
memoryStream.Close();
cryptoStream.Close();
string EncryptedData = Convert.ToBase64String(CipherBytes);
return EncryptedData;
}



Prev Post                    All Post                           Next Post

Posted in | 3 comments

Unable to cast object of type 'ASP.type' to type 'ASP.type'. or Could not load file or assembly 'App_Web_xxxxxxxx, Version=0.0.0.0, Culture=neutral,

Problem :-
Unable to cast object of type 'ASP.type' to type 'ASP.type'.
or
Could not load file or assembly 'App_Web_xxxxxxxx, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
 Solution :-
Both errors appear in ASP.NET application from time to time. There are some info about master pages, nested user controls related to this stuff. And hotfix from MS, usually. Not sure that hotifx helps, but you can try. Anyway, this error last till application automatic rebuild. So, you can just reupload/change some files of your project, and force rebuild. There are some notices that this error can occur weekly or even daily. Restart app every day is not looks good. Bad news. Avoid of master pages and user controls usage - is a bad idea. 
But immediate cause of this - incorrect automatic compiler work. So, to correct this error on production hosting, you can use precompiling.
The advantages of precompiling:


  1. You don't need to upload any source code on server. (Woo Hoo - hosting guys can't take your application)


  2. Above error not occurs, because source already compiled. (I recommend -fixednames option usage).


  3. Less delays because of recompiling.


  4. Small site size.
How to make your site precompiled (prepare for publish)? 
Let's start. First of all, locate this utility C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe (your path can be different because of windows directory). After that create a cmd-file with following content:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler -fixednames -p d:\projects\web1\source\ -v / d:\projects\web1\build\
 
Some descriptions regarding this line:
     -p  sets physical path to your web site source
     -v  sets virtual directory where you want to publish your site ( / set the root of virtual directory, 99% that you don't need to change this )
     -fixednames binaries will be given fixed names
I'm suggest that this should be used only for production hosting, because in case of frequent updates... not very comfortable to work through build.

.


Prev Post                    All Post                           Next Post

Posted in | 2 comments