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

404 not found address

$
0
0

Hi

I have a custom page for 404 HTTP error code. This page logs the visiting of this page. I want to determine what page the user was trying to view and log it too. Is there any way to determine the not found page?

I also have ELMAH and it does not get 404 errors. Is this the normal behavior of ELMAH when having a custom error page?

Thanks


Redirect multiple URLs to one HTTPS URL

$
0
0

I am trying to redirect users to https and found some articles on how to do this; however, I need to make some additional modifications and needs some help. What I currently have in web.config is:

<rule name="Redirect to HTTPS" stopProcessing="true">  <match url="(.*)" />  <conditions>  <add input="{HTTPS}" negate="true" pattern="^OFF$" />  </conditions>  <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />  </rule>  

This redirects http://<server_name>/<site_name> to https://<server_name>/<site_name>

I need to be able to redirect users to http://<server_alias>/<site_name> if they type any of the following:

http://<server_alias>

http://<server_alias>/<site_name>

http://<server_name>

http://<server_name>/<site_name>

The application server has an alias (more user friendly name).

IE11 Local Region Date and Number formatting problem

$
0
0

I've tested my application locally on my laptop using various cultural setting including Swiss and all of them work.  By this I mean, the dates and number formatting works as expected for all regions including Swiss.  When I move the application from my laptop to my Server, all the cultures work EXCEPT Swiss.  I don't know what else to do.  Can you help solve this mystery?

.dat (a zip) file truncated when downloaded from a web service IIS6.0 that has been published in a remote win 7 desktop successfully

$
0
0
<div class="post-text" itemprop="text">I have published a web service application (C# built in VS2010) to a desktop with IIS 6.0 win7.

The web service has been hosted successfully.

Now I can install the application on my laptop by accessing the URL

http://myDesktopName.domain.com/MyApp/MyAppSetup.msi

pointing to a physical location in desktop

E:\myPath\myApp\myAppService.svc

Now, in my application, I need to download a .dat file from my desktop to my local laptop by visiting the URL.

"http://myDesktopName.domain.com/MyApp/download.ashx?cmd=download&type=db&name=myDatasbase.dat"

But, the downloaded file size is not correct. Sometimes, it is 0. Sometimes, it is 9KB or 64KB. But, the original size s 4,000 KB.

The file is binary and is not readable in any text editor.

If I download the file from IE by typing the URL

http://myDesktopName.domain.com/MyApp/download.ashx?cmd=download&type=db&name=myDatasbase.dat

in address bar, the file can be downloaded correctly.

Why the file cannot be downloaded correctly from my application ?

thanks

</div>

Web service time out issue

$
0
0

Hi All, I am facing time out issue with the web services which are hosted in IIS 6.

I have a number of WCF services developed in .net 3.5 framework hosted in an IIS server . When one of the service is getting slower or getting timed out due to some issue with the target system(database) of that particular services, Other services hosted in the same IIS server too are getting timed out. Is there any way to mitigate this issue. How can I keep other services uninterrupted even if one service is getting time out.

Appreciate your help on this.

Thanks.

Visual Studio Rebuild deletes Telerik.Web.UI.XML

$
0
0

Hi,

When I Rebuild my project just prior to Publish, I notice that the file Telerik.Web.UI.XML gets deleted from the bin folder. As a result when I Publish, Visual Studio will throw me an error: 

Copying file bin\Telerik.Web.UI.XML to obj\Release\AspnetCompileMerge\Source\bin\Telerik.Web.UI.XML failed. Could not find file 'bin\Telerik.Web.UI.XML'.

My workaround is to copy that file from C:\Program Files (x86)\Telerik\UI for ASP.NET AJAX Q2 2015\Bin45 back to my project bin folder. This time, Rebuild will not delete it and I am able to Publish without error. However, if I close Visual Studio and try again, the same thing will recur.

Why does that file -- and only that one -- get deleted? When I check the project bin folder prior to Rebuild, that file is there and not excluded.

Thanks for the help.

HTTP Error 404.0 - Not Found

Resource file not found

$
0
0

Hi All,

I have extended a Class Library project by introducing a Resource file (.resx). From within the resource file editor, I have set the 'Access Modifier' to public, the build action to Resource and copy to Output Directory Always.

My code expects the Resource file to reside in the same directory as that main Dll. The Resource file after deployment resides in the same directory as the main dll, but when an application that has made reference to the dll and methods, fails stating that it cannot access the resource file.

supposing the main DLL has a namespace of MyLogger.Common. then

in the actual code I have:

 var assembly = this.GetType().Assembly;
            var resourceManager = new ResourceManager("MyLogger.Common.ErrorResource", assembly);

in my Test harness project that is linked to the main project it of course works fine. It's only after deployment that the resx file cannot be found. Any ideas?

The Error states : Make sure "MyLogger.Common.ErrorResource,resources" was correctly embedded or linked into assembly "MyLogger.Common" at compile time. 

The Resource file is called ErrorResource.resx it looks as though it's tagging 'resources' on the end during compile for some reason, where do I go to remove this?


Deploying Windows Authentication - 404 - File or directory not found

$
0
0

I put together a basic test site that authenticates through windows. On my local system it works perfect. When I try to deploy to our internal web server, I get the following error message:

<div id="header">

Server Error

</div> <div id="content"> <div class="content-container">

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

</div> </div>

Oddly, I can directly access any HTML file in that directory, but soon as I try to load an aspx page, this error occurs. I cant seem to find the answer through google. Seems like it should work fine as it works perfect on my local system... Any ideas? I have the site setup in IIS for Windows Authentication. And my web.config has the following:

<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>

Could not load file or assembly RazorGenerator.Core.v1.dll - Migrating from 1.3.1 to 2.3.4

$
0
0

Hello,

I have upgraded a solution from System.Web.Web.* 1.0.0.0 to 2.0.0.0

Since the upgrade the RazorGenerator is failing to compile the pre-compiled views with the following error:

Could not load file or assembly '[removed]\RazorGenerator.Core.v1.dll' or one of its dependencies. The system cannot find the file specified

That's a weird error because if I add RazorGenerator.Core.v1.dll then I would have to add System.Web.Web.* 1.0.0.0 again.

At the moment I have a pretty standard RazorGenerator.targets:

oject xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <RazorGeneratorMsBuildPath Condition=" '$(RazorGeneratorMsBuildPath)' == '' ">$(MSBuildThisFileDirectory)\RazorGenerator.MsBuild.dll</RazorGeneratorMsBuildPath>
    <RazorViewsCodeGenDirectory Condition=" '$(RazorViewsCodeGenDirectory)' == '' ">$(MsBuildProjectDirectory)\obj\CodeGen\</RazorViewsCodeGenDirectory>
    
    <CompileDependsOn>
      PrecompileRazorFiles;
      $(CompileDependsOn);
    </CompileDependsOn>
  </PropertyGroup>

  <UsingTask AssemblyFile="$(RazorGeneratorMsBuildPath)" TaskName="RazorCodeGen" />
  <Target Name="PrecompileRazorFiles" Returns="@(FilesGenerated)">
    <ItemGroup>
      <RazorSrcFiles Include="**\*.cshtml" />
    </ItemGroup>
    
    <RazorCodeGen ProjectRoot="$(MsBuildProjectDirectory)" 
                  FilesToPrecompile="@(RazorSrcFiles)"
                  CodeGenDirectory="$(RazorViewsCodeGenDirectory)"
                  RootNamespace="$(RootNamespace)">
      <Output TaskParameter="GeneratedFiles" ItemName="FilesGenerated" />
    </RazorCodeGen>
    
    <ItemGroup>
      <Compile Include="@(FilesGenerated)" />
    </ItemGroup>
  </Target>
</Project>

I have the following files withing the same folder than RazorGenerator.targets:

Microsoft.Web.Infrastructure.dll v1.0.0.0

RazorGenerator.Core.dll v2.3.4

RazorGenerator.MsBuild.dll v2.3.4

System.Web.Helpers.dll v2.0.0.0

System.Web.Mvc.dll v4.0.20710.0 (I tried with 2.X too but got same error)

System.Web.Razor.dll v2.0.0.0

System.Web.WebPages.Deployment.dll 2.0.0.0

System.Web.WebPages.dll v2.0.0.0

System.Web.WebPages.Razor.dll v2.0.0.0

My question is: what's the error? why is RezorGenerator looking for RazorGenerator.Core.v1.dll?

Thanks,

John

Deployed website Error

$
0
0

I created a website but it was built with the wrong code from TFS. Because of this I copy the correct code web folder from my c: drive to the IIS website folder. The website runs fine; however, when I try to build the site in VS I get the following error:

Error 102 The configSource file 'appSettings.config' is also used in a parent, this is not allowed.

ASP.NET Identity from Domain to Subdomain

$
0
0

Hi All,

I am trying to have users to signin on www.mysite.com and get redirected, once authenticated, towww.secure.mysite.com unsucessfully.

The problem is to configure my application to work with asp.net identity from my domain to my subdomain.

I have read many articles about how to configure the application but it seems that all tips I got don't work because the majority of them are based on past Target frameworks.

I am using target framework 4.5.1 and what I did so far is to add in my domain's web.Config file the following lines of code:

<authentication mode="Forms"><forms name="name" loginUrl="~/" defaultUrl="https://www.mysite.com/" domain="mysite.com" timeout="2880"/></authentication>

while, in my subdomain's web.Config file the following:

<authentication mode="Forms"><forms name="name" loginUrl="~/" defaultUrl="http://secure.mysite.com/" domain="mysite.com" timeout="2880"/></authentication>

I have also tried to add the same machine key like the following one in both web.Config file and still doesn't work:

<machineKey validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE" decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F" validation="SHA1" decryption="Auto"/>

Do you have any suggestions on how to accomplish this?

By the way, could also someone explain me how to create a machine key?

Thank you so much in advance

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

$
0
0

Hi All,

I am using Microsoft.Office.Interop.Excel.dll(version 11.0.5530.0)  reference in my project to create excel sheet and use in my code. it was working fine for a while . I was creating office 2003 .xls format files. and my  web server has office 2010 installed. Later as per site requirement , I had to create excel sheet in .xlsx using office 2007 format. for that I updated reference to 14. something.  Then I started getting following error.

Retrieving the COM class
factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed
due to the following error: 80070005 Access is denied. (Exception from HRESULT:
0x80070005 (E_ACCESSDENIED))

I tried to resolve it on server by following steps given in this link . but couldn't resolve it.

https://waheedrous.wordpress.com/2014/01/26/error-office-interop-assemblies/

I also tried solutions given on another thread here, but no luck.

http://forums.asp.net/t/1760531.aspx?Retrieving+the+COM+class+factory+for+component+with+CLSID+00024500+0000+0000+C000+000000000046+failed+due+to+the+following+error+80070005+Access+is+denied+Exception+from+HRESULT+0x80070005+E_ACCESSDENIED+

Even to resolve it I downgraded reference back to old version . But it didn't resolve the issue. Please provide your thoughts.

my web server is windows server 2008 r2, project is hosted on IIS 7 or higher , .net framework 4.5.1  in vb.net 

 

DNX Configuration Issues

$
0
0

I'm looking for documentation regarding DNX configuration.

Presently I'm attempting to connect to an Oracle database with EntityFramework 6.1.3.

I get the following error; "Unable to determine the provider name for provider factory of type 'Oracle.ManagedDataAccess.Client.OracleClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config."

I have no idea how to configure the project.json file, or the config.json file.  I'm attempting to create a test console application to see if the connection works.

I've installed the NuGet packages for oracle.

1) How do I tell the console application to use the config.json file?

2) How do I tell the console application to use the appropriate data provider?

Why do precompiled .ascx controls (in subfolders) not work on server?

$
0
0

I have  a .ascx control: ~/controls/pickers/library.ascx.

  • With a deployed precompiled .site, the control does not work within it's respective page (shifts.aspx).  (no error, it just doesn't load at all).
  • With a non-compiled site, (ie, push source files up), the control works fine in the respective page (shifts.aspx).

Interestingly, when I have deployed the precompiled version, I can only access the control if I navigate to ~/library.ascx.  As there is nothing in ~/controls/pickers folder.

My webconfig is set to this:

<add tagPrefix="mc" tagName="Library" src="~/controls/pickers/Library.ascx" />

I have tried resetting the tagPrefix src setting to be just ~/library.ascx, but still no luck.

I have precompiled my site with the following settings.

  • Application->Property Pages->MSBuildProperties: Use Fixed names and single page assemblies
  • Publish Web Site -> Settings ->File Publish Options->Precompile During Publishing ->Do not merge.  Create a separate assembly for each page and control.

What am I missing here?  Any help would be greatly appreciated!

Jason


IIS how to determine ApplicationPoolIdentity account ?

$
0
0

Windows Server 2008 R2 Standard ( Microsoft Windows Server Version 6.1 Build 7601: Service Pack 1 )

IIS 7.5.7600.16385

For a Site assigned an ApplicationPool with Identity = ApplicationPoolIdentity ( the default ) , how to determine the actual Windows Account the site uses for directory operations ?

Deploying and Publishing an ASP.NET application which implements EF code first model

$
0
0

Hi,

I have completed coding an ASP.NET Web Forms application in which I have used Entity Framework Code First Model to make my database.

Now, I want to publish my website to a hosting server.

I don't know what to do to make my model work on the hosting server.

please help

thanks

Is it possible for a cookie set in a HTTPS connection be read in HTTP connection

$
0
0

Hi All,

very stupid question but I cannot find any relevant answer to this question.

I am trying to share an authentication cookie of my asp.net application running in a https connection with a subdomain running in http connection.

In addition to the following configuration in both web.Config and Startup.Auth files I guess I need to add something else in order to allow the cookie generated in the https connection be available for all type of connections:

<authentication mode="Forms"><forms name="FormsAuthentication" path="/"
             loginUrl="Default"
         defaultUrl="Default"
             timeout="2880"
             cookieless="UseCookies"
         enableCrossAppRedirects ="true"
             domain=".mydomain.com"
         requireSSL="true"/></authentication><machineKey decryption="3DES" decryptionKey="blablabla" validationKey="blablabla" />







Public Sub ConfigureAuth(app As IAppBuilder)
        app.CreatePerOwinContext(AddressOf ApplicationDbContext.Create)
        app.CreatePerOwinContext(Of ApplicationUserManager)(AddressOf ApplicationUserManager.Create)
        app.CreatePerOwinContext(Of ApplicationSignInManager)(AddressOf ApplicationSignInManager.Create)
        app.UseCookieAuthentication(New CookieAuthenticationOptions() With {
            .AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            .Provider = New CookieAuthenticationProvider() With {
                .OnValidateIdentity = SecurityStampValidator.OnValidateIdentity(Of ApplicationUserManager, ApplicationUser)(
                    validateInterval:=TimeSpan.FromMinutes(30),
                    regenerateIdentity:=Function(manager, user) user.GenerateUserIdentityAsync(manager))},
          .LoginPath = New PathString("/Default"),
             .CookieDomain = ".mydomain.com"
        })
         app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie)

Thank you

IIS gZip Compression Not Working after Setting Everything

$
0
0

Hi All,

 

I deployed a simple html page with ajax (loading a json file) in my iis 8.0 (windows 8) and iis7+ (windows 7). 

1. I enabled static and dynamic compression in IIS

2. I have written all the tags in we.config and the same has been attached.

 

Still I am not getting content-encoded: gZip . Why? Can you please help me.

 

WEB.CONFIG<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"><scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" /><dynamicTypes><add mimeType="text/*" enabled="true" /><add mimeType="message/*" enabled="true" /><add mimeType="application/x-javascript" enabled="true" /><add mimeType="application/json" enabled="true" /><add mimeType="*/*" enabled="false" /></dynamicTypes><staticTypes><add mimeType="text/*" enabled="true" /><add mimeType="message/*" enabled="true" /><add mimeType="application/x-javascript" enabled="true" /><add mimeType="application/atom+xml" enabled="true" /><add mimeType="application/xaml+xml" enabled="true" /><add mimeType="*/*" enabled="false" /></staticTypes></httpCompression><urlCompression doStaticCompression="true" doDynamicCompression="true" /><staticContent><!-- Set expire headers to 30 days for static content--><clientCache cacheControlMaxAge="30.00:00:00" cacheControlMode="UseMaxAge"/><!-- use utf-8 encoding for anything served text/plain or text/html --><!-- in the case of .html files; if you AJAX load html files (i.e. in angular) then remove these two lines. --><remove fileExtension=".html"/><mimeMap fileExtension=".html" mimeType="text/html; charset=UTF-8"/><remove fileExtension=".css"/><mimeMap fileExtension=".css" mimeType="text/css"/><remove fileExtension=".js"/><mimeMap fileExtension=".js" mimeType="text/javascript"/><remove fileExtension=".json"/><mimeMap fileExtension=".json" mimeType="application/json"/><remove fileExtension=".rss"/><mimeMap fileExtension=".rss" mimeType="application/rss+xml; charset=UTF-8"/><remove fileExtension=".xml"/><mimeMap fileExtension=".xml" mimeType="application/xml; charset=UTF-8"/><!-- HTML5 Audio/Video mime types--><remove fileExtension=".mp3"/><mimeMap fileExtension=".mp3" mimeType="audio/mpeg"/><remove fileExtension=".mp4"/><mimeMap fileExtension=".mp4" mimeType="video/mp4"/><remove fileExtension=".ogg"/><mimeMap fileExtension=".ogg" mimeType="audio/ogg"/><remove fileExtension=".ogv"/><mimeMap fileExtension=".ogv" mimeType="video/ogg"/><remove fileExtension=".webm"/><mimeMap fileExtension=".webm" mimeType="video/webm"/><!-- Proper svg serving. Required for svg webfonts on iPad --><remove fileExtension=".svg"/><mimeMap fileExtension=".svg" mimeType="image/svg+xml"/><remove fileExtension=".svgz"/><mimeMap fileExtension=".svgz" mimeType="image/svg+xml"/><!-- HTML4 Web font mime types --><!-- Remove default IIS mime type for .eot which is application/octet-stream --><remove fileExtension=".eot"/><mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject"/><remove fileExtension=".ttf"/><mimeMap fileExtension=".ttf" mimeType="application/x-font-ttf"/><remove fileExtension=".ttc"/><mimeMap fileExtension=".ttc" mimeType="application/x-font-ttf"/><remove fileExtension=".otf"/><mimeMap fileExtension=".otf" mimeType="font/opentype"/><remove fileExtension=".woff"/><mimeMap fileExtension=".woff" mimeType="application/font-woff"/><remove fileExtension=".crx"/><mimeMap fileExtension=".crx" mimeType="application/x-chrome-extension"/><remove fileExtension=".xpi"/><mimeMap fileExtension=".xpi" mimeType="application/x-xpinstall"/><remove fileExtension=".safariextz"/><mimeMap fileExtension=".safariextz" mimeType="application/octet-stream"/><!-- Flash Video mime types--><remove fileExtension=".flv"/><mimeMap fileExtension=".flv" mimeType="video/x-flv"/><remove fileExtension=".f4v"/><mimeMap fileExtension=".f4v" mimeType="video/mp4"/><!-- Assorted types --><remove fileExtension=".ico"/><mimeMap fileExtension=".ico" mimeType="image/x-icon"/><remove fileExtension=".webp"/><mimeMap fileExtension=".webp" mimeType="image/webp"/><remove fileExtension=".htc"/><mimeMap fileExtension=".htc" mimeType="text/x-component"/><remove fileExtension=".vcf"/><mimeMap fileExtension=".vcf" mimeType="text/x-vcard"/><remove fileExtension=".torrent"/><mimeMap fileExtension=".torrent" mimeType="application/x-bittorrent"/><remove fileExtension=".cur"/><mimeMap fileExtension=".cur" mimeType="image/x-icon"/><remove fileExtension=".webapp"/><mimeMap fileExtension=".webapp" mimeType="application/x-web-app-manifest+json; charset=UTF-8"/></staticContent><defaultDocument><files><add value="test.html" /></files></defaultDocument></system.webServer></configuration>

 Thanks,

Abhi

Problem with Web,Config in Framework

$
0
0
 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: Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'.

Source Error:


Line 129:                <add extension=".exclude" type="System.Web.Compilation.IgnoreFileBuildProvider" />
Line 130:                <add extension=".refresh" type="System.Web.Compilation.IgnoreFileBuildProvider" />Line 131:                <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
Line 132:                <add extension=".xoml" type="System.ServiceModel.Activation.WorkflowServiceBuildProvider, System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 133:                <add extension=".svc" type="System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />


Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config    Line: 131

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

Any Reason for this?

Viewing all 3561 articles
Browse latest View live


Latest Images

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