Showing posts with label ASP.Net. Show all posts
Showing posts with label ASP.Net. Show all posts

Thursday, January 21, 2010

Hosting ASP.NET 1.1 Application in IIS7 with Windows Server 2008 Environment




Migrating your ASP.NET 1.1 application from IIS 5.1 to IIS 7 is easy task , until you had installed all the patches and Service pack , while installing the IIS 7 install the IIS 6 Comparable tools also

Check List:

Mostly in Windows Server 2008 there won’t be ASP.NET 1.1 , so we need to install the .Net Framework 1.1 , then the service pack for .Net framework 1.1 then the security updates for asp.net 1.1 , After you installed all the patches you can find the ASP.NET 1.1 in the application pool (fig -1)


fig-1

Yes now your IIS 7 is ready for ASP.NET Application , then Create a Virtual Directory and assign the Specific folder of the application , then assign the asp.net 1.1 application pool to the application


Click on the application in the right hand side you can find the action window [fig-2]Click on the Basic Settings edit window will open [fig-3 ] in that select the ASP.NET 1.1 application Pool and press Ok


fig-2


fig-3

Tips & Tricks:


Tips 1 : Custom Error Click on the projects in the property area under IIS  Error Pages  open this right Click on the window and open the Edit window [fig-4] here you can set the customer error based on your needs [fig-5]


fig-4


fig-5

Tips 2: SMTP –Just fill the Necessary details


Tips 3: Authentication - Purpose is same as the previous version this time must user friendly then before

Common Errors:

IIS Worker process stopped. – If you had not installed Service pack for 1.1 this error will come

An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Ambiguous match found – if you had not assigned the correct application pool



Folks all the above said procedures, tips and error messages are what I had faced in my production environment. Kindly bear for my poor English


Tuesday, January 19, 2010

Error Message :

unable to start debugging on the web server. the type initializer for system.net.digestclient threw an exception

Cause : if your environment is VS2005 with .Net Framework 2.0 ,and if u have an assembly with security.dll this error will come ,

Solution : rename the assembly name
Error Message

Error 811 F:\MySampleProject\RptCrystalViewer.aspx: ASP.NET runtime error: '/LM/W3SVC/1/ROOT/MySampleProject/is not a valid IIS application. F:\MySampleProject\RptCrystalViewer.aspx 1 1 Finance



Cause : Due to Invalid path


Solution :


Right Click on the Project go to the web Tab and Change the path


Friday, December 25, 2009

Error Message :

ASP.NET Ajax client-side Framework failed to load

Solution :

add the tag in web config file

While using the Ajaxtoolkit and if you have different version of Framework you might receive this message

Error Message :

Error 2 Assembly 'AjaxControlToolkit, Version=3.0.30512.17815, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' uses 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Solution :

in the web config file inside the configuration section add this tag

Friday, February 13, 2009

Error: The Web Server Could Not Find the Requested Resource while debugging the web application you might receive this type of error after you update the web application tools

Reason :
If you have installed the URLScan Filter this error will come , basically URLScan is for IIS 7 if you install for IIS 6 it will create this problem .

Solution:
Un install the URLScan Tool , Because IIS 6 has all the resources of URLScan

Wednesday, January 28, 2009

Nowadays i am mostly working in VS 2005 , i have a problem in master page . the problem is when i am creating the pages its not showing the option to select the master page, I am receiving this problem in my laptop but in my desktop I had installed the same version its showing the option .As a temporary solution I am adding the master page in code behind . any guess what could the problem . I had also installed the service pack 1 for VS 2005 in
both the PC

Sunday, November 23, 2008


Error Message :
This error will occur when u try to send mail from your web application
"the smtp server requires a secure connection or the client was not authenticated"

Cause : due to the Network Credential we will receive this error when we use any third pary smtp servers

SOLUTION :


string sMailServer = "smtp.gmail.com";
MailMessage mailmsg = new MailMessage("sampl@gmail.com", "sampl2@gmail.com", "HAI", "Success ! ");
SmtpClient smtpclt = new SmtpClient();
System.Net.NetworkCredential basicauth = new System.Net.NetworkCredential("sampl@gmail.com", "007");
smtpclt.Host = sMailServer;
smtpclt.UseDefaultCredentials=false;
smtpclt.Credentials=basicauth;
smtpclt.EnableSsl = true;
smtpclt.Send(mailmsg);

Error Message :

Failed to update database "D:\HOHRMIS\APP_DATA\ASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "D:\HOHRMIS\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Cause of the problem :

when we move the project from the inetpub default folder to some other location we will get this error , this is due to the read / write rights .

Solution :

  • Detach the database
  • Give read / write access to the APP_DATA folder
  • Attach the database then run it

Wednesday, October 08, 2008


Error:
some time while saving the project we may receive this type of error

Error occured saving the project file '' access is denied

Cause:

read only rights is given the project folder

Solutiuon :

Remove the Read only rights for the project and give write rights also
Error:

Auto-attach to process '[4572] aspnet_wp.exe' on machine 'PRABAKAR' failed. Error code 0x8013134b.
OR
Error While Trying to Run Project : Unable to start debugging on the server.


Cause:
there are many reason for this error.the one possiable reason is when u r migrating form one version to another versionwe will get this type of error.

Solution :

select the project in the IIS and go to the properties and select the ASP.NET Tab and change the version,possiable to the previous version.

Tuesday, April 29, 2008

Find Colum present in the table or not

Hi,
 
if((select @count=count(*) from sysobjects tab,syscolumns col where col.id=tab.id  and tab.Name=<tablename> and col.name=<columnname>)>0)
begin
              print 'Column present'
end
else
begin
                  print 'Column not present'
end
 
Regards,
Sasikumar D
 
Direct - +91 80 41041751
Mobile - +91 9986080299



iGATE is Ranked No. 3 in DQ-IDC best IT employer survey and Ranked No.6 
by Business Today-Mercer Human Resource Consulting-TNS  in a cross industry survey of Best Companies to work for in India
----------------------------------------------------------------DISCLAIMER---------------------------------------------------------
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual 
or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or mailadmin@igate.com 
and delete this EMAIL including any attachments

Monday, February 18, 2008

Writing the Error or any log message to Event log of the OS

string sSource, sLog, sEvent;
sSource = "Error Occur While Inserting Employee Record";
sLog = "Application";
sEvent = "Insert";

if (!EventLog.SourceExists(sSource))
EventLog.CreateEventSource(sSource,sLog);
EventLog.WriteEntry(sSource,sEvent);

Saturday, January 19, 2008

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30560: 'Global' is ambiguous in the namespace 'IIMS'.

Source Error:


Line 31: _
Line 32: Public Class Global_asax
Line 33: Inherits IIMS.Global
Line 34:
Line 35: Private Shared __initialized As Boolean = false

Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\iims\6d858d13\228f9de0\y2eps_v4.0.vb Line: 33


Reason: There is an assembly in the project with the same class name; we can find the assembly in the bin folder

Solution : Just delete the assembly from the bin folder and rebuild the solution .This kind for error occur some time when we may change the assembly name for some reason and forget the delete the assembly from the bin folder

Tuesday, December 11, 2007

To display the content in the web browser status bar

<’''body id="samplepage" onload ="window.status='First Page'">
<''form id="Form1" method="post" runat="server">

<''/form>
<’''/body>
Disabling the right click in the webpage
" <" body id="”samplepage”" oncontextmenu="return false;">

<"/body>"
Getting the client browser / system details through ASP.NET

HttpBrowserCapabilities bc=new HttpBrowserCapabilities();
bc=Request.Browser;
Response.Write(bc.Cookies.ToString());
Response.Write(bc.ActiveXControls.ToString());
Response.Write(bc.Platform.ToString());

Here HttpBrowserCapabilities is an class which is available in the system.web namespace ,first create an object and assign the client browser to it then we can get the details of the client browser with this the different property available

Response.Write( HttpContext.Current.Server.MachineName ) ;


This is used to get the client system name

Thursday, May 03, 2007


Using IIS 7 for visual studio 2003 in Microsoft Vista. We can have both VS2003 and VS2005 in the single system and for VS2005 the default Server is IIS 7 ,since the IIS 6 and IIS 7 can not run in single system the IIS 7 manager will disable the II6, So we can make the IIS 7 as comparable to VS2003 by enabling the Compatibility option in the control panel


Click the Turn Windows features on or off then in the popup window check the IIS 6 Management compatibility

Now run your VS2003 web application in admin mode ,this process will enable the VS2003 to use IIS 7



Disable Back Button in the browser

Hi guys,
 
If you want to disable back button in web browser, include the following JavaScript code inside the <head> portion of the HTML,

<script type="text/JavaScript">
     history. forward();
</script>
 
Regards,
Sasikumar



----------------------------------------------------------------DISCLAIMER---------------------------------------------------------
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual 
or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or mailadmin@igate.com 
and delete this EMAIL including any attachments

Wednesday, April 18, 2007

Nice Link for web services which we can use for our line application .For example they have the currency converted web services which will have the running dollars rates so u will get the exact rate as of now

http://www.webservicex.net/WCF/default.aspx

They have different services like this just go and check