Monday, October 21, 2013

Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.

Error :-
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.

Solution:-

You can change the ApplicationPoolIdentity from IIS7 -> Application Pools -> Advanced Settings.




Under ApplicationPoolIdentity you will find local system. This will make your application run under NT AUTHORITY\SYSTEM, which is an existing login for the database by default.

How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7

Error :-
How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7

Solution :-

First make sure you have IIS installed.
Then perform the following steps:
  1. Click the Start button .
    In the Search box, type command prompt.
    In the list of results, right-click Command Prompt, and then click Run as administrator.  If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
     
  2. Type cmd and press ENTER
  3. Type cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ and press ENTER.
  4. Type aspnet_regiis.exe -ir and press ENTER again.
    • If this is a fresh version of IIS (no other sites running on it) or you're not worried about the hosted sites breaking with a framework change you can use -i instead of -ir. This will change their AppPools for you and steps 5-on shouldn't be necessary.
    • at this point you will see it begin working on installing .NET's framework in to IIS for you
  5. Close the DOS prompt, re-open your start menu and right click Computer and select Manage
  6. Expand the left-hand side (Services and Applications) and select Internet Information Services
    • You'll now have a new applet within the content window exclusively for IIS.
  7. Expand out your computer and locate the Application Pools node, and select it. (You should now see ASP.NET v4.0 listed)
  8. Expand out your Sites node and locate the site you want to modify (select it)
  9. To the right you'll notice Basic Settings... just below the Edit Site text. Click this, and a new window should appear
  10. Select the .NET 4 AppPool using the Select... button and click ok.
Here You goooo !!

Tuesday, October 15, 2013

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Error :- 
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Solution :-

Install file from below link and just restart IIS.

http://www.microsoft.com/en-us/download/details.aspx?id=13255

Images Shown in Mozilla and other modern Browser but not in lower version of IE

Error :-
Images Shown in Mozilla and other modern Browser but not in lower version of IE.

Solution :-
Wrong color combination had been used and that is why the images were not being displayed.
The color mode chosen (YCbCrk) for your images was derived from RGB, not supported by all versions of IE and suported only in Firefox 3 and above. Thus, re-saving them to jpeg format will not work, at least not directly. Doing so will save them back to the same color mode.

However, there is a way to convert JPG(YCbCrk) to JPG(YCbCr)
Your original pictures JPG-->convert them to ---> PNG or GIF--->convert them to-->JPG

After the conversion, the quality of the images is virtually the same from the original, smaller file size, and works with IE.

Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server.

Error :- 
When i was going to export excel from grid view in .Net i was faced this error "Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server."

Solution :- 
Code behind confirmed it that you indeed are exporting your grid.

The above exception occurs when one tries to export a GridView control to Word, Excel, PDF, CSV or any other formats. Here the .net compiler thinks that the control is not added to the form and is rendered, hence it throws this error even if your GridView control is inside a form with runat = “server”.

You have to tell the compiler that the control is rendered explicitly by overriding theVerifyRenderingInServerForm event.

Like:
public override void VerifyRenderingInServerForm(Control control)
{
  //Confirms that an HtmlForm control is rendered for the specified ASP.NET server          control at run time.
}

This will confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time.