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

Publishing to a subfolder - Attribute 'processPath' is required.

$
0
0

My asp.net core app loads fine when I publish to the website's root directory.  However, I would like to publish it to a "sandbox" subfolder.  When I try that, I get the error:

Could not load configuration. Exception message: Attribute 'processPath' is required.

Source: IIS AspNetCore Module V2

My web.config file is: 

<?xml version="1.0" encoding="utf-8"?><configuration><location path="." inheritInChildApplications="false"><system.webServer><handlers><add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /></handlers><aspNetCore processPath="dotnet" arguments=".\CTM.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" /></system.webServer></location></configuration>

Any idea how I can resolve this?  Thanks in advance.


Process.Start not working in IIS

$
0
0

Hi

I am a beginner. I am using Process.Start in my web service application to fire a local command on my web server. I am very much successful in running this code in Visual studio development studio. However when I deploy it to Local IIS server, this command runs, but not starts/run the local application.

Can you pleas help. I badly need any of your help.

Regards

Badri

URL Redirect at Application Level

$
0
0

Hi,

I had a old website with a domain www.mydomain.com,and on mobile, it was www.mydomain.com/mobile.

Now, my new site is fluid with all types of device. www.mydomain.com/mobile no longer exists. What I want to do is this: When the application loads, check if the requested URL contains "/mobile", if it does, replace with nothing and redirect. I have this code.

void Application_Start(object sender, EventArgs e)
{
    string url = HttpContext.Current.Request.Url.AbsoluteUri;
    if (url.IndexOf("/mobile") > -1)
    {
       url = url.Replace("/mobile", "");
       Response.Redirect(url);
     }
}

No matter which page is requested, I only need to remove "/mobile" from the URL, and redirect.

I tried to put this code on master page, on default, and then on Global. None of them redirect. Could someone tell me how to implement this?

Thank you immensely.

Ella

Application initialisation on IIS 10, application wide Preload, Alwaysrunning, Web.config. how to.

$
0
0

I have found that for the website to preload correctly I need 3 things set.

1.  Application Pool needs the value Start Mode set to AlwaysRunning

2. the Web Application needs the value Preload Enabled set to True

At this point I would have thought the sites would preload correctly but they do not. I have also needed to

3. Configuration Editor for the Web Application > navigate to Section: system.webServer/applicationInitialization

and set doAppInitAfterRestart to True and also each aspx file that you want to have preloaded listed in the collection.

If an aspx file is not listed in that collection it will not be preloaded.

how can i apply application wide preload. preferably only by web.config.

problem of publishing and first appearance site on net researchs motors

$
0
0

hello,

i've got a site which is published on world wide web but i've got a problem of referencement otherwhise a good appearance on net researchs motors as www.google.com orwww.bing.com

which solution could i used to have a good appearance or referencement on resarchs motors ? i used the meta balise "keywords" but the site is not visible when i set some of keywords on the taskbar or researchs motors.

thanks for your help or for your contribution !

marc-antoine

asp.net Core & Plesk Combination

$
0
0

Hi,

for some hours now I have been struggling with this:

I have created an asp.net Core Application in C# with Visual Studio. Also I have rented a Virtual Windows 2016 Server with Plesk preinstalled. My goal is simply to get my Web Application running on this Server. What I have tried so far:

  • Uploaded my entire Solution Folder / my Bin Folder / a published Version into my Plesk File Manager - unfortunately when I try to set the index.cshtml File as root Page, Plesk forbids me to use .cshtml files...
  • Added a index.html file to my asp.net project and made it my startup page, but now: how do I redirect to the index.cshtml file, because something like

https://localhost:44379/../Pages/index.cshtml didn't work...

Is this even supposed to work like this, just by adding my Project files to Plesk?

Thank you for any help on this!!

emilector

How do you like to manage your Development, Staging and Production Environments?

$
0
0

I'm getting ready to deploy my first asp.net core web application.  I have a development environment on my own PC and also have two servers - one for staging and one for production.  Each environment will have it's own database.  

My question is what sort of process / workflow do  you like to use while deploying your applications to your different environments?  And what do you do/use to backup your project files?

Load balancing

$
0
0

Hi Team,

I am doing the load balancing via using Network Load Balancing Cluster which i installed from server manager

In Network Load Balancing Clusters i have added current ip address  of the machine and do not have alternate ip address to for the same web application so in this how can i have 2 load balancing cluster of same ip address and same application .

If cluster fails then it goes to another or user excess more than 40 then goes to cluster 2

Unable to upload image so it can also refer to following url and refer to Figure 8

http://itcontractors.org/content/view/506/1/

Roemesh


URL Re-Write creates "Object Moved" page for missing files with link to physical path of 404 page on server

$
0
0

Hello - When using URL Re-Write to redirect HTTP requests to HTTPS we get an "Object moved to here." page.  This isn't necessarily a problem, but the "here" link contains the physical path to the error page:

https://<site name>/c%3a%5cinetpub%5ccusterr%5cen-US%5c400.htm%3faspxerrorpath%3d%2ftest.aspx

The url re-write rule is:

<rule name="HTTPS Rule" enabled="true" stopProcessing="true">
    <match url="(.*)" />
        <conditions>
            <add input="{HTTPS}" pattern="^OFF$" />
        </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" />
</rule>

The physical path being displayed is being reported as a security issue and I need to either eliminate the redirect page or have the link point to the 404 page.  We are using the standard issue IIS custom error pages with default settings.  Any help would be greatly appreciated.

404 error where physical path is wrong for "subsite"

$
0
0

I am trying to publish some internal use only asp.net projects to a server on our lan. There are several aspects of this that I'm confused about.

Using vs 2017, webdeploy successfully published the site. However when I try to access the site, I get a 404 error. I get this error regardless of whether I spec the ip address of the server, and/or the default.aspx page, or index.html which I manually created for testing purposes after this issue arose.

What is particularly noteworthy is that while the project has been published to c:\inetpub\box on the server (2012 r2), the 404 error lists the physical path as c:\inetpub\wwwroot\box, which does not exist.

I suspect that the issue may be that I misunderstand how to configure what I'll call a "subsite". I would like several asp.net projects to be published on this server, at addresses like

http://myserver/box
http://myserver/contact

the root website, http://myserver, might just contain a page with links to the subsites.

I can reach http://myserver and it shows the default.aspx that I have in wwwroot, which is a good indication that wwwroot is regarded as the go-to site for iis.

In IIS I created the new website box and the physical path there is listed as c:\inetpub\box

There are other websites on the same server from earlier tests. All of them run on port 80.

The 404 error message shows off the incorrect physical path c:\inetpub\wwwroot\box, it seems that wwwroot somehow has precedence and gets injected into url request like http://myserver/box. How do I adjust this?

Deploying Website error CS0246: The type or namespace name 'MyClass' could not be found (are you missing a using directive or an assembly reference?

$
0
0

Hello, 

  I am currently deploying an ASP.Net Website(Not Web application) and met this problem: CS0246: The type or namespace name 'MyClass' could not be found (are you missing a using directive or an assembly reference?).

  The Visual Studio I used to write my codes are Microsoft Visual Studio Community 2015. I am using an ASP.Net Website, not the Web Application. I put two CS files( e.g.SQLHelper) into the folder App_Code. When I started this project, the .NetFramework I used is .Net 4.5.2. ( Ididn't have much idea of the version of .Net Framework at that time). Later I came into realized that this may cause an issue. So when I build the website, I set the target Framework to .Net 4.0 so as to match my Virtual Host. (I did this by right click website ->property page->Build->target Framework-->choose 4.0).

As for Deployment, I used the right click-->publish Web-->publishMethod:FTP-->fill out username and password. I left the desination URL blank since I do not know how to fill it.   The FTP I had is provided by Alibabacloud(I bought a Cloud Virtual Host from Alibabacloud). I already set the .Net Framework settings of my Virtual Host to ASP.NEt 4.0 Integrated mode.

The website run on my computer fine. But after deployment, when I type the logOn page in the Browser, it showed the error Website error CS0246: The type or namespace name 'UserGate' could not be found (are you missing a using directive or an assembly reference?).UserGate is the class I defined in the CS file in App_Code foler. So I add namespace MyClass to the CS File and added Using MyClass at the top of ever .aspx.cs file in my project. Then I requested the LogOn page in Browser again and found the error is "The type or namespace name 'MyClass' could not be found (are you missing a using directive or an assembly reference?". So I guess somehow the contents of App_code cannot get run. 

What shall I do?

Oh, BTW, the name of my project is called TicketSystemWeb, but somehow in the Solution Explorer, Under the solution'TicketSystemWeb(1 project), it shows the earth-like image and the name TicketSystemWeb(2). It automatically added (2). I do not know whether the name caused this issue. 

 Below is the Web Configuration.

<?xml version="1.0"?><!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  --><configuration><connectionStrings><add name="bds_dbConnectionString" (I omit the username and password here) providerName="System.Data.SqlClient"/></connectionStrings><system.web><compilation debug="false" targetFramework="4.0"><assemblies><add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation><customErrors mode="Off"></customErrors><httpRuntime/></system.web></configuration>

Login failed for user 'DOMAIN\MACHINENAME$', IIS and SQL Server on same machine

$
0
0

I am using webdeploy to publish an asp.net project to a server on my LAN, using integrated security via Active Directory. When I try to run the site I get this error

Login failed for 'mydomain\servername$'

I've found some pretty in depth thread about this issue and have tried many settings, none of which have worked so far.

Adjustments I've made:

[1] in IIS change the websites application pool process model identity. I've tried all of the built in accounts and several custom accounts

[2] in SQL Server, which runs on the same server as IIS, I've added various accounts like mydomain\servername$, then NT AUTHORITY\NETWORK SERVICE, then IIS APPPOOL\appname, then mydomain\myaccount (I'm a domain admin).

[3] Generally I correlate the app pool account and the sql server login.

I get exactly the same error for all of the variations (well some minor exception details vary). I've restarted IIS multiple times, though I've not read that this is needed after changes like these. What settings should work?

Bundling and Minification not working when i deploy to Azure

$
0
0

Hi ,

I have deployed a web project which uses Bundling and Minification to Azure , but it seems that the files , both .css and .js files are not loading correctly. 

Is there a known issue with this ?

Thanks

Robby

Suddenly Website Stop Working In Hosting Server Application Pool

$
0
0

Hello

We have hosted one website & one database in cloud hosting. Suddenly the website is showing application pool stopped we contact hosting provider even we dont have 6000 record in our tables its just 11mb database. And The site is using only 4 users

Hosting provider chat support is saying to optimize the website to reduce the memory usage. How to know whos problem is this our site or hosting site the same issues we got 2 months before the hosting problem.

The setting is like this in performance setting

Help me to solve this issues.. In 4 of our aspx page we have used session in our report..? for datatable filter? is this cause application pool problem?

need help

Thanking You

Publish ASP.net project (ASP.NET C# with classic ASP) in Visual Studio 2017

$
0
0

I am a new member of the team.  I am tasked to publish the project with a mixture of ASP.NET and classic ASP.  It runs fine.  How do you publish (deploy) the hybrid project like this?

Thanks,

Ti


Host .Net Application is Open Source

$
0
0

Hi expert,

i plan to host .Net application in open source operating system, any suggestion especially the configuration,performance and etc.

Plan to host in fedora@centos not planning to host in Windows IIS.

Thanks and waiting reply from expert here.

The request failed with HTTP status 413: Request Entity Too Large.

$
0
0

Hello,

I get the error 413 Request Entity too large when I try to transfer image as base64 string larger than 2.5 MB with other data in Ajax on my server.

$.ajax({
method: "POST",
url: '@Url.Action("PostUpdate", "Image")',
cache: false,
processData: false,
contentType: false,
data: formData,
// ...

The error found :

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>413 Request Entity Too Large</title></head><body><h1>Request Entity Too Large</h1>
The requested resource<br />/Image/PostUpdate<br />
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.</body></html>

Server info : ASP.NET MVC, Framework 4.7.2, Windows Server 2012 R2, IIS 8.5.

Knowing that in localhost it works well this image transfer.

By following several subjects on this problem by internet, I make some changes on web.config, However, I can't fix the bug :
Here is some changes in web.config :

<system.web.extensions><scripting><webServices><jsonSerialization maxJsonLength="2147483647"/></webServices></scripting></system.web.extensions><system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="334217728" /></requestFiltering></security></system.webServer><system.web><httpRuntime targetFramework="4.7.2" maxRequestLength="200048576" /></system.web>

I also increased the value of uploadReadAheadSize in IIS (200000000).


How can I fix this bug?

Thanks in advance

connection string encryption

$
0
0

Hi Expert,

I have done the encryption in web config file how asp.net and sql server will take it as runtime .Encrypted or Decrypted

example:if i browse the site i am able to get records but it is not just one db . application runs with multiple dbs and afraid of using encrypted connection as may cost error while communicating multiple dbs. it would be good if .net framework 4.5 will handle and convert to decrypted at run time .database is ms sql server

Regards

Roemesh

aspnet_regiis.exe -pdf "connectionStrings""<Path of the Folder containing the Web.Config file>"

CI/CD Pipeline throws error - 'Unity' could not be found (are you missing a using directive or an assembly reference?

$
0
0

Hi All,

I have configured a CI/CD pipeline in Azure Devops and works fine till now. However, since few days my build are getting failed which throws error as below:

Error CS0246: The type or namespace name 'Unity' could not be found (are you missing a using directive or an assembly reference? 

I am creating an enterprise application and I am using n-tier architecture where I have following projects:

  1. WebForms App
  2. DataModel
  3. Business Entities
  4. Business Services
  5. Resolver

Though, I verified locally I am able to build and project runs successfully but unfortunately in CI/CD pipeline it throws error in Resolver project as Unity package is missing. How can I get rid of this?

I am using Unity as a Dependency Resolver.

Thanks.

ClickOnce Application won't launch unless host has (or had) Visual Studio Installed

$
0
0

We have a basic Windows Forms application, which acts as a shell around a CefSharp browser and is distributed to our clients via ClickOnce deployment.
Generally we haven't had many issues with people installing this application, as most of our clients have been upgrading from a previous .Net desktop application. However some of our newer clients have been purchasing brand new computers with a clean install of Windows 10, and in those cases the application fails to start unless we install a copy of Visual Studio, and then remove it to save disk space.

The error we see is this:
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
   at App.Client.Program.Main()

Followed by a standard appcrash report:
Faulting application name: App POS.exe, version: 1.0.0.0, time stamp: 0x5e87294b
Faulting module name: KERNELBASE.dll, version: 10.0.18362.418, time stamp: 0x2b181c2c
Exception code: 0xe0434352
Fault offset: 0x00113572
Faulting process id: 0x17d4
Faulting application start time: 0x01d6280dfdaf68fd
Faulting application path: C:\...\App POS.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll

It seems like the clickonce launcher is not pointing to the correct application packages location, since it can't even find the entry point in Program.Main(). 
The files and manifests all install correctly into the AppData directory, identical to what we see on other machines. No changes have to be made after installing VS. The application just runs where it had failed before.

Is there a known way around this so we do not have to continue to download a very large and unnecessary IDE onto our clients' business machines? Does clickonce have some hidden .net/sdk dependencies that we're missing?

Thanks!

Viewing all 3561 articles
Browse latest View live


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