Thursday, December 11, 2014

Image does not show up on webapplication when I published it to IIS 7

I have published my webapplication to IIS7 on windows 2008R2 server.
The images were not showing up on the page, everything else seems to be working

I checked the handler mapping on the web site
Sites-> Default Web Site

double Click on Handler Mappings

Static File is missing



Goto Windows Features 
Enable  "Static Content" feature WWW services-> Common HTTP Features

Wednesday, December 10, 2014

Copying file bin\WebApplication .dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication .dll failed. Could not find file 'bin\WebApplication .dll'

If you get the following error while publishing
Error 9 Copying file bin\WebApplication3.dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication3.dll failed. Could not find file 'bin\WebApplication3.dll'. 0

open application.csproj file in notepad
and see if you have Webapplication#.dll and .pdb file in the csproj file
remove them from the csproj

<ItemGroup>
    <Content Include="bin\ProjectName.dll" />
    <Content Include="bin\ProjectName.pdb" />
    <Content Include="bin\WebApplication3.dll" />

    <Content Include="bin\WebApplication3.pdb" />

   <Content Include="bin\WebApplication3.dll.config" />


we can publish it now

Wednesday, December 3, 2014

edmx compilation issues

In visual Studio 2013, I have added ADO.Net Entity Data Model.
After rebuilding the project, I could not use the entity data connection in my entity data source.
The error I was getting was
The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata

to resolve it,  open the newly created xyzentities.edmx file in notepad and change the Provider


      <Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">


<Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">