Quantcast
Channel: Configuration and Deployment
Viewing all 3561 articles
Browse latest View live

Publish loses css styles

$
0
0

I have done a publish of my MVC application from my local machine to my local IIS...

however despite all the functionality being fine, it looks different as regards the layout...

I have identified that one of my css files doesn't seem to be taking effect (or hasn't gone across..) by inspecting the elements affected and have verified this by removing this particular css file from my bundle locally and seeing the exact same layout as my published site...

any idea what has happened here? to my mind the "missing" css file looks no different to another few that are added... and works fine on my local machine...


Not able to view my websites at home / connect to sql server

$
0
0

Hello,

This morning I was not able to view ANY of my websites that are hosting with a company.  I was not able to connect to my database either.  I submitted a ticket to their support and they responded back to me with everything was normal on their end.  I tried to navigate to my websites via my cell phone (with WiFi off) and everything worked. Then turned WiFi back ON and everything did not work - wouldn't let me connect to my websites or my sql databases.  Why would it not be working from my ISP stand point? Do I need to contact them?  Everything else seems to work fine.

(please move this post to the correct group if I put it in the wrong one)

run web application located in a computer using other computers in network

$
0
0

hi,

Consider we have a small network and there is a web application in on of Computers.

how can run this web application in other computers using web browser?

for example by entering somthing like ( localhost://myprogramname ) in address bar.

I searched over the internet and find some articles do it using MAMP (I think mamp is somthing like IIS for php programmers) but not IIS.

Thanks for your time

WebDeploy Builds Package, but doesn't actually deploy.

$
0
0

We have a VS2012 asp.net mvc web site which we can successfully publish via Visual Studio. When attempting to publish via a command on the build server (that ultimately will be started via the build process) the task completes but does not actually publish

As per sayeds instructions here : http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx 
I have the command thus:

msbuild MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=DevAzure.pubxml /p:Password=[password] /p:VisualStudioVersion=11.0

The output goes through various stages including:

PipelineCopyAllFilesToOneFolderForMSDeploy..
GenerateMsdeployManifestFiles...
MSDeployPublish: (which states)
   Start Web Deploy Publish..
   Starting Web Deployment Task from source....
   Updating ACL's for path...
   Successfully executed Web deployment task.
   Publish Succeeded
PipelineDeployPhase:
   Publish Pipeline deploy phase
Done Building Project c... MyProject.csproj

Build Succeeded.
  0 Warnings
  0 Errors

Any Ideas what I'm missing?

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, Invalid at the top level of the document. Error processing resource

$
0
0

I am trying to execute existing application solution locally I am getting below error,  this application is calling a third party service to generate pdf document and return byte format using that byte format  and using below code generate PDF.  This application is working fine in live.

 I am using Windows Server 2008 and directly browsing over there and while live environment is Windows Server 2003.

byte[] documentByte = Session["DocumentContentSessionKey"] as byte[];

        // Clear the Document Content from session
        Session.Remove("DocumentContentSessionKey");

        if (documentByte != null)
        {
            Response.ContentType = "application/pdf";
            Response.AddHeader("Content-Disposition", "inline");
            Response.OutputStream.Write(documentByte, 0, documentByte.Length);
            Response.Flush();
            Response.Close();
            //HttpContext.Current.ApplicationInstance.CompleteRequest();
            Response.End();
        }

 

Error -

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

 --------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'http://localhost:29540/App/Document.aspx'. ...

 %PDF-1.3%

Write access to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

$
0
0

Hello,

my host migrated my homepage to another server, since then it doesn't run any more.

At first there were error messages such as "Could not load file or assembly Microsoft.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies. Access is denied."

When I deleted the corresponding dll-files in the bin-folder because of "http://stackoverflow.com/questions/5831785/nuget-core-dll-version-number-mismatch", a new error message was displayed: "The current identity (SERVER\USER) does not have write access to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files."

I tried what people suggested in "http://forums.asp.net/t/1566987.aspx?Current+Identity+does+not+have+Write+Access+to+v4+0+30319+Temporary+ASP+NET+Files": I tried to reinstall asp.net using "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_regiis.exe -i", but this changed nothing. Then I tried to change the access rights using "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_regiis.exe -ga SERVER\USER", but then the following error message was displayed in the command window:
"The SERVER\USER does not exist."

Then I found in "http://stackoverflow.com/questions/9994188/why-is-my-asp-web-application-attempting-to-write-to-c-windows-microsoft-net-fr" that I should insert "<compilation tempDirectory="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files" />" in the configuration-tag of the web.config file. After that "Server Error - 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed." was displayed.

So, I have tried different things that were proposed in the forums, but nothing worked. Do you have other ideas?

Kind regards,

JanuaryTwo

How to run my asp.net web application on another computer in the same network

$
0
0

I have a website application in asp.net. It is running successfully in my computer. How can I run it on another system in the same network. My website is likehttp://localhost:62651/vs/Default6.aspx, this is running on my system. In another system instead of localhost I have used my ip address, but its not working.

http://192.168.100.62:57843/WebSite10/ I have used this but its not working. If I used this its not working in my system too.

Default Account Controls do not work on server MVC 5

$
0
0

Hello All, I really need your help with this.

My application works perfectly on Visual Studio with this default connection string :

<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-Books-20150114567898.mdf;Initial Catalog=aspnet-Books-20150119023806;Integrated Security=True" providerName="System.Data.SqlClient" />

Then I changed my connection string to this, this still works on Visual Studio.

<add name="BooksContext" providerName="System.Data.SqlClient" connectionString="Data Source=SERVER06\SQLSERVER2005EX;Initial Catalog=booksdb; User ID=admin; Password=123456"/>

But I don't know where it stores User data now. And when I upload my code to server and try to register onmysite/Account/Register I get these errors :

[Win32Exception (0x80004005): The system cannot find the file specified]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]

Any help is appreciated. Thanks.


error show

$
0
0

hii,

i m getting below error in asp.net c# 4.0 version use

thanks in advance. Please help asap

Server Error in '/' Application.


Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.

Source Error:

Line 18:   <location allowOverride="false">
Line 19:     <system.web>Line 20:     <trust level="Full" />Line 21:     <!--<sessionState mode="InProc" cookieless="true" timeout="60"/>-->
Line 22:     <httpHandlers>


Source File: D:\INETPUB\VHOSTS\xyz.in\web.config   Line: 20


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

Unable to create the virtual directory

$
0
0

Hello All,

          Whenever i try to create virtual directory from visual studio 2010 project settings, i get the below mentioned error

"Unable to create the virtual directory. Could not find the server 'http://localhost/MVCDemo' on the local machine. Creating a virtual directory is only supported on the local IIS server."

I am on Windows 7 professional and using vistual studio 2010 professional

Problem with form timeout and session timeout

$
0
0

Hello, 

I'm having troubles with these two properties of the web.config. When the user is logged and after over 20 or 30 minutes of inactivity, the session is ends but does not redirect to the login page as is specified in the web.config.

This is the code in web.config:

<authentication mode="Forms"><forms name=".ASPXAUTH" loginUrl="~/Login/Login.aspx" defaultUrl="~/Default.aspx" slidingExpiration="true" 
timeout="1440" requireSSL="false" /></authentication>
<sessionState mode="InProc" timeout="1450"></sessionState>

Could anyone tell me why this is happening?

Not able to create a virtual directory in IIS 7.0 using visual studio 2010

$
0
0

Hi,

I have created an ASP.NET MVC4 application. I wanted to deploy that application in IIS. When i tried to create a virtual directory, the system throws a message ""Unable to create a virtual directory. Could not find the server 'http://localhost/MVCApplicationDemo' on the local machine. Creating a virtual directory is only supported on the local IIS server."".

Any valuable help is appreciated.

Regards,

RAJAN CRP

Runtime Error

$
0
0

Server Error in '/' Application.


Could not load file or assembly 'HttpModuleRedirect' or one of its dependencies. The system cannot find the file specified.

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.IO.FileNotFoundException: Could not load file or assembly 'HttpModuleRedirect' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'HttpModuleRedirect' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace:

[FileNotFoundException: Could not load file or assembly 'HttpModuleRedirect' or one of its dependencies. The system cannot find the file specified.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +62
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +42
   System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +77
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +105
   System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64

[ConfigurationErrorsException: Could not load file or assembly 'HttpModuleRedirect' or one of its dependencies. The system cannot find the file specified.]
   System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +11173117
   System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +78
   System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +194
   System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1891
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): Could not load file or assembly 'HttpModuleRedirect' or one of its dependencies. The system cannot find the file specified.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11301814
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4341684

I've opened this project using VS2012, updated a number of HTML settings i.e. added a CSS stylesheet and put some attributes in there. Basically I've only made a few cosmetic changes to this project but when I configure it in IIS and try to browse to it I get the above error. Any ideas where I should begin to debug? IIS Setup is App Pools v4.0 with a Network Service Identity.

500 Internal Server Error

$
0
0

I am using GoDaddy Hosting site for my webhosting and i get the following error -

http://i.imgur.com/VwP8id3.jpg

When i am trying to access the web content on my localhost after i downloaded from hosting site then i get the below error-

http://i.imgur.com/nBafVmX.jpg

my web.config file code is as follows-

<?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/><section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><system.web><sessionState regenerateExpiredSessionId="true" cookieless="false" timeout="60" mode="InProc"/><profile><properties><add name="SearchTerms" type="System.Collections.Specialized.StringCollection" serializeAs="Xml"/></properties></profile><securityPolicy><trustLevel name="full" policyFile="Web_mediumtrust.config"/></securityPolicy><compilation debug="true" strict="false" explicit="true"><assemblies><add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation><pages validateRequest="true" enableEventValidation="false"><namespaces><clear/><add namespace="System"/><add namespace="System.Data"/><add namespace="System.IO"/><add namespace="System.Collections"/><add namespace="System.Collections.Specialized"/><add namespace="System.Configuration"/><add namespace="System.Text"/><add namespace="System.Text.RegularExpressions"/><add namespace="System.Web"/><add namespace="System.Web.Caching"/><add namespace="System.Web.SessionState"/><add namespace="System.Web.Security"/><add namespace="System.Web.Profile"/><add namespace="System.Web.UI"/><add namespace="System.Web.UI.WebControls"/><add namespace="System.Web.UI.WebControls.WebParts"/><add namespace="System.Web.UI.HtmlControls"/><add namespace="System.Data.SqlClient"/><add namespace="System.Net"/><add namespace="System.Net.Mail"/></namespaces><controls><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/><add namespace="FredCK.FCKeditorV2" assembly="FredCK.FCKeditorV2" tagPrefix="fckeditorv2"/></controls></pages><authentication mode="Windows"/><customErrors mode="Off" defaultRedirect="~/index.aspx"><error statusCode="404" redirect="~/index.aspx"/></customErrors><authorization><allow users="*"/></authorization><httpHandlers><remove path="*.asmx" verb="*"/><add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><remove verb="*" path="*.asmx"/><add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/></httpHandlers><httpModules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></httpModules></system.web><appSettings><add key="dsn_SQL" value="TK3SOWBak8BFJLnXpoLLO96xQzzkaCVp92N+BsLFlJHDw6h4Gdf4nyiCarMxUMPu2+mRQ/EuR5Dr0hhPRJXQn+69VBETpf40bOWt0SROIfk="/><add key="dsn_SQLsgigroup" value="y1gziODnBrfnuCxtgT/9cyOkis3BNUv1SqOUdnnd1WRZlrImdnEg2k7r+1LIGN4AEhJ2r5WZQNNLY/S9Vw2sfcKi0rEzEEfonjGrmVb8ZQrzTIQVDX+RlP6W4vDx/z56"/><!--add key="dsn_SQL" value="7xJPgonwS7NuJ5KFAEya3TdortxmId1+mbYaJJfK2/bz/xxh8l4PHhSpWoDui6ftZ4qT9kT1P1PpJZzGPq7BSswKLka8RNN7RagNX2WPRSM="/--><!--From Mail Server--><add key="smtpserver" value="204.93.174.175"/><add key="gmailuser" value="externalcommunication@sgei.org"/><add key="gmailpwd" value="nokiasamsung"/><add key="frommail" value="externalcommunication@sgei.org"/><add key="tomail" value="fri.mca@gmail.com"/><add key="mailport" value="465"/><!--From Mail Server End--><add key="FCKeditor:UserFilesPath" value="~/uploads/"/></appSettings><system.webServer><validation validateIntegratedModeConfiguration="false"/><modules><add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></modules><handlers><remove name="WebServiceHandlerFactory-Integrated"/><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></handlers></system.webServer></configuration>

Help me please to remove the errors..

Thanks in advance

Why Asp.Net 2.0 running when 4.5.1 installed?

$
0
0

I am setting up IIS on a test machine with Window 7-64.

Getting this error:

"Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive"

The line in web.config is:

<compilation debug="true" strict="true" explicit="true" targetFramework="4.5.1">

Here is the part that does not make sense:

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483

Asp.Net 4.5, 4.5.1 are installed, yet 2.0 is running.  What am I missing?

Help most appreciated.


Remote Server ExceptionSetting minFreeMemoryPercentageToActivateService requires full trust privilege. Please change the application's trust level or remove this setting from the configuration file.

$
0
0

Hello,

I am uploading my asp.net application into remote server. i am getting following error. Any help will be appreciated.

Setting minFreeMemoryPercentageToActivateService requires full trust privilege. Please change the application's trust level or remove this setting from the configuration file.

How to enable bundling and minification on IIS 6 version

$
0
0

I am trying to publish our website to deployment server.which includes changes to global.asax file's application_start.which registers a bundle to load/compress js/css files.it works fine with local solution on IIS 7.

But when we deploy same application to server(IIS 6).all bundled resources are not loading after login to the page.i believe problem with global.asax as this file makes a call to the bundle class to register bundled resources.

When i look at the global.asax file.Global.asax file is present in root directory of publised folder.and global.dll files are present in bin folder too.

I dont understand the reason that its not updating the global.asax file in production server.

due this issue i am not able deploy it to  server.

Please help me to solve this issue with global.asax.

It works fine with IIS 7.but i need to deploy same application IIS 6.

Please let me know if any configuration required for this.

Can i deploy asp.net mvc web application 5.2.2 (with .net version 4.4) + entity framwork 6.0 UNDER IIS 7.0 + application pool with version 4.0

$
0
0

I have the following :-

  • Asp.net MVC 5.2.2 that uses .net version 4.5
  • entity framework version 6.0
  • async controllers

so now I want to deploy the above web application inside IIS. currently I have the following for my IIs:-

  • iis version 7.0
  • application pool version .net 4.0

so can I deploy my asp.net mvc5 (with .net v4.5) + ET6.0 under IIS 7.0 +application pool V4.0 ?

find where trace is written

$
0
0

hi all,

i have an old project, it is writing Trace but, i dont know where it is writing, may i know how do i find in which place the trace is writing and how to open it?

Could not load file or assembly 'App_Code' or one of its dependencies. An attempt was made to load a program with an incorrect format.

$
0
0

Hi everyone,

I've been having a problem with the .NET application I'm working on ever since I started working on it last April.  My development computer runs Windows XP Pro 2003 64-bit Edition.  All of the projects in my solution are set to compile with the "Any CPU" mode.  I can run the application just fine in debug and release modes, but I've tried and tried to make it work when I publish it in inetpub/wwwroot and it just won't work.  I always get the following error :

 

Server Error in '/Requisitions' Application.

Could not load file or assembly 'App_Code' or one of its dependencies. An attempt was made to load a program with an incorrect format.

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.BadImageFormatException: Could not load file or assembly 'App_Code' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'App_Code' could not be loaded.

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = App_Code
 (Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/Requisitions/
LOG: Initial PrivatePath = c:\inetpub\wwwroot\Requisitions\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\inetpub\wwwroot\Requisitions\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/requisitions/833f9d68/80608f77/App_Code.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/requisitions/833f9d68/80608f77/App_Code/App_Code.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/Requisitions/bin/App_Code.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

Stack Trace:

[BadImageFormatException: Could not load file or assembly 'App_Code' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +465
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
   System.Reflection.Assembly.Load(String assemblyString) +42
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'App_Code' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +3642024
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +402
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +155
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +235
   System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +214
   System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +57
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +259
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +406
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +125
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +203
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +514
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +274


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Well, I said it never works, well it does work on computers who run Windows XP 32-bit without any problems.  I also manager to get it working on my computer by doing the following :

http://support.microsoft.com/kb/894435/en-us

ASP.NET 2.0, 32-bit version

<script type=text/javascript>loadTOCNode(2, 'moreinformation');</script> To run the 32-bit version of ASP.NET 2.0, follow these steps:

1.Click Start, click Run, type cmd, and then click OK.
2.Type the following command to enable the 32-bit mode: <div class=indent>cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1</div>
3.Type the following command to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under: <div class=indent>%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i </div>
4.Make sure that the status of ASP.NET version 2.0.50727 (32-bit) is set toAllowed in the Web service extension list in Internet Information Services Manager.

The problem is that I can't remain in that mode, because all of my other apps don't work when I do it, only the one that I wanna be able to use.  I switched back to the 64-bit mode and all of my other apps started working again except for the one specified in my error message.

I've tried absolutely every trick that was suggested on these forums as well as everywhere else, and absolutely nothing seems to work.

Here are some of the things I tried :

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2679445&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=665884&SiteID=1

http://support.microsoft.com/default.aspx?scid=kb;en-us;329065

http://blogs.componentone.com/CS/forums/t/74096.aspx

http://www.dotnetjunkies.ddj.com/Forums/ShowPost.aspx?PostID=1633

 

All of our other apps work fine on both 32-bit and 64-bit platforms.  I compared them with the one that doesn't work and I can't see anything wrong or different between the 2.

Any suggestions?  I'm desperate...   

 

Thanks a lot in advance!

Viewing all 3561 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>