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

aspnet_compiler.exe Issue: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

$
0
0

Hi all,

 I am using Visual Studio 2019 (16.6.5) for development of a application using  Umbraco 7.5.10 (with uCommerce) and my project works well on my Windows 10  Dev / VS machine.

I have now also been able to deploy to a (Go Daddy) hosted web server and have managed to do that successfully using Visual Studio Web Deploy (Publish).

Now I am trying to deploy in the much the same manner (using Visual Studio Web Deploy / Publish) but this time with the following options:

  • Precompile during publishing
  • DO NOT allow precompiled site to be updatable

Using Precompile during publishing results in the build process calling aspnet_compiler.exe as follows:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\TempBuildDir

That is resulting in the following error:

2>C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\bin\web.config(99,0): Error ASPCONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

As described above, the aspnet_compiler.exe compilation activity above is all internal to the dev machine, with the source being in the VS Projects obj folder at C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source, and the destination also being in the VS Projects obj folder at C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\TempBuildDir .  The aspnet_compiler.exe cannot know whether the destination virtual directory on the destination  IIS machine is configured as an “application” or not. So I assume the error is NOT caused by a “virtual directory not being configured as an application in IIS” as suggested.

So what else can cause this issue and how can it debug this please ?

I have reviewed the posts at  https://stackoverflow.com/questions/2355947/error-allowdefinition-machinetoapplication-beyond-application-level but none of the solutions have worked for me.

 Any assistance understanding, debugging or fixing this issue would be appreciated.

 Thanks

 Terry Clancy

ClanceZ


Need help with web.conf file

$
0
0

Hello to all

I’m having problem with my web.conf file. This file work fine on the local server without any problem at all whatsoever. My site can handle files, forms, upload pictures and users could login without a problem on the local server.

However, when I upload the web.conf to the remote server and access the page online through the Internet, I cannot login as an user and the page is displaying errors. The following is the error that the page is displaying:

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: 26 - Error Locating Server/Instance Specified)

Here is the code in my web.conf file:

<?xml version="1.0"?><!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
--><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><system.webServer><validation validateIntegratedModeConfiguration="false" /><handlers><remove name="ChartImageHandler" /><add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
        path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, 
        System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, 
        PublicKeyToken=31bf3856ad364e35" /></handlers></system.webServer><appSettings><add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /></appSettings><connectionStrings><add name="MainWebConnection" providerName="System.Data.SqlClient" 
     connectionString="Server=FakeServer;Database=FakeDatabase;
     Uid=FakeID;Password=FakePassword;" /><add name="SecondMainConnection" providerName="System.Data.SqlClient" 
     connectionString="Server=FakeServer;Database=FakeDatabase2;
     Uid=FakeID;Password=FakePassword;" /></connectionStrings><system.web><!--This new part was added by me in order to avoid the required non-alphanumeric character" --><httpHandlers><add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        validate="false" /></httpHandlers><membership><providers><!--THIS STRING IS ONLY TO BE USED WITH THE ASP.NET WEB SITE ADMINISTRATION TOOL 
            FOR WEBSITE ON REMOTE SERVER.   -->    <add connectionStringName="LocalSqlServer" name="MyProvider" 
         minRequiredNonalphanumericCharacters="0" maxInvalidPasswordAttempts="25" 
         passwordAttemptWindow="30" type="System.Web.Security.SqlMembershipProvider" /></providers></membership><roleManager enabled="true" cacheRolesInCookie="true" createPersistentCookie="true"><providers><!--THIS STRING IS ONLY TO BE USED WITH THE ASP.NET WEB SITE ADMINISTRATION TOOL 
            FOR WEBSITE ON REMOTE SERVER.--> <add connectionStringName="LocalSqlServer" name="MyRoleProvider" 
          type="System.Web.Security.SqlRoleProvider" /></providers></roleManager><!-- The <authentication> section enables configuration of the security 
         authentication mode used by ASP.NET to identify an incoming user. --><authentication mode="Forms"><forms loginUrl="MemberService/Login.aspx"/></authentication><authorization><allow roles="Administrator"/></authorization><pages controlRenderingCompatibilityVersion="3.5" maintainScrollPositionOnPostBack="true"
      clientIDMode="AutoID"><namespaces><clear /><add namespace="System" /><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.Drawing" /><add namespace="System.IO" /><add namespace="System.Data" /><add namespace="System.Data.Odbc" /><add namespace="System.Web.UI.Page" /><add namespace="System.Web.Configuration" /><add namespace="System.Collections.Generic" /><add namespace="System.Net.Mail" /><add namespace="System.Security.Cryptography" /><add namespace="System.Drawing.Drawing2D" /><add namespace="System.Drawing.Imaging" /><add namespace="System.Drawing.Design" /><add namespace="System.Net" /><add namespace="System.Net.Mime" /></namespaces><controls><add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
          assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, 
          PublicKeyToken=31bf3856ad364e35" /></controls></pages><!--Set compilation debug="true" to insert debugging symbols into the compiled page. 
         Since this affects performance, set this value to true only during development.

         Visual Basic options:
         Set strict="true" to disallow all data type conversions where data loss can occur. 
         Set explicit="true" to force declaration of all variables.
     --><compilation debug="true" strict="false" explicit="true" targetFramework="4.0"><assemblies><add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, 
         PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation><!--THIS SHOULD BE CHANGE TO ON AFTER THE DEBUGGING AND CONECT ALL SENTENCES--><!--This new part was added by me in order to display an error message when an 
        user find a server error after a request. --><customErrors mode="Off"><!--  defaultRedirect="~/Classifieds/MessagePage.aspx?PanelToView=PageErrorPanel" ><error statusCode="401" redirect="~/Classifieds/MessagePage.aspx?PanelToView=PageErrorPanel" /><error statusCode="403" redirect="~/Classifieds/MessagePage.aspx?PanelToView=PageErrorPanel" /><error statusCode="404" redirect="~/Classifieds/MessagePage.aspx?PanelToView=PageErrorPanel" /><error statusCode="500" redirect="~/Classifieds/MessagePage.aspx?PanelToView=PageErrorPanel" />
       --></customErrors><!-- This new part was added by me for caching purposes, pollTime should be good 
         for 1,000 = 16 minutes.  --><caching><sqlCacheDependency enabled="true" pollTime="1000" ><databases><add name="FakeDatabase" connectionStringName="MainWebConnection" /></databases></sqlCacheDependency></caching><!-- This new part was added by me for the size and time allowed when uploading files 
         to the server --><httpRuntime maxRequestLength="51200" executionTimeout="1800"/><!-- This new part was added by me for the intention to increase the session loging 
         time for an user --><sessionState timeout="360000" mode="InProc" /></system.web><system.net><mailSettings><smtp><network host="mail.fake.com" userName="auto_reply@fake.com" password="fake123456789"/></smtp></mailSettings></system.net></configuration>

Please I need help with this, thanks to all.

EFCore, Migrations & ConnectionString

$
0
0

I have a class library project containing the entity models and DBContexts. Having trouble getting the ConnectionString from the UI project's appsettings.json file.

Here's a couple of things I've tried (please note my C# and Web dev knowledge is pretty low level):

1. services.AddDbContext added to ConfigureServices method in UI.Web project. 

//Project: Entities.EF
//Type: Class Library (.NET CORE 3.1)
//DataAccess/ProductCategoriesContext.cs

using Entities.EF.Models.Products.Categories; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Text; namespace Entities.EF.DataAccess { public class ProductCategoriesContext : DbContext { public ProductCategoriesContext(DbContextOptions<ProductCategoriesContext> options) : base(options) { } public DbSet<ProductModel_Category_Tier1> Categories_Tier1 { get; set; } public DbSet<ProductModel_Category_Tier2> Categories_Tier2 { get; set; } public DbSet<ProductModel_Category_Tier3> Categories_Tier3 { get; set; } public DbSet<ProductModel_Category_Type> Category_Types { get; set; } } }
//Project: UI.Web
//Startup.cs

using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Entities.EF.DataAccess; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.SqlServer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace WebApp { public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddRazorPages(); services.AddDbContext<ProductCategoriesContext>(options => { options.UseSqlServer(Configuration.GetConnectionString("Default")); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); }); } } }
//Project: UI.Web
//Sappsettings.json

{"ConnectionStrings": {"DefaultConnection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=TestDB2;Integrated Security=True;" },"Logging": {"LogLevel": {"Default": "Information","Microsoft": "Warning","Microsoft.Hosting.Lifetime": "Information" } },"AllowedHosts": "*" }

Error:

//Package Manager Console
//Default Project set to : Entities.EF

PM> add-migration InitialDB
Unable to resolve startup project ''.
Using project 'Entities\Entities.EF' as the startup project.
Build started...
Build succeeded.
System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)PM> 

2. Changed class library to target framework : .NET CORE 2.2

//Package Manager Console //Default Project set to : Entities.EF 

PM> add-migration InitialDB Unable to resolve startup project ''. Using project 'Entities\Entities.EF' as the startup project. Build started... Build succeeded.Unable to create an object of type 'ProductCategoriesContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 PM>

3. The only way to get it to work was by removing services.AddDbContext() from ConfigureServices in UI.Web/Startup.cs and using the OnConfiguring method inside the DBContext:

//Project: Entities.EF
//Type: Class Library (.NET CORE 2.2)
//DataAccess/ProductCategoriesContext.cs

using Entities.EF.Models.Products.Categories; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Text; namespace Entities.EF.DataAccess { public class ProductCategoriesContext : DbContext { //public ProductCategoriesContext(DbContextOptions<ProductCategoriesContext> options) : base(options) { } #region CATEGORIES public DbSet<ProductModel_Category_Tier1> Categories_Tier1 { get; set; } public DbSet<ProductModel_Category_Tier2> Categories_Tier2 { get; set; } public DbSet<ProductModel_Category_Tier3> Categories_Tier3 { get; set; } public DbSet<ProductModel_Category_Type> Category_Types { get; set; } #endregion protected override void OnConfiguring(DbContextOptionsBuilder options) { options.UseSqlServer("Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=TestDB;Integrated Security=True;"); } } }

So... does migraton only work if the class library is targeted at .NET CORE 2.2?

And how can I get ConnectionString without explicity declaring it in the Class Library project?

Any help would be greatly appreciated.

Communicating react with asp.net core on remote server (httpdocs folder) does not work

$
0
0

hi all, i have built two saparate projects client(react with redux) and webapi (asp.netcore). both working fine and communicating on localhost.now i purchased windows hosting and uploaded both in httpdocs folder in plesk file manager as follows:

server (asp.netcore webapi ) deployment:

in webapi. i changed the url in program.cs from "http://localhost:4000" to https://www.virtualcollege.pk as:

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace WebApi
{
    public class Program
    {
        public static void Main(string[] args)
        {
            CreateHostBuilder(args).Build().Run();
        }

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>()
                      .UseUrls("http://www.virtualcollege.pk");
                });
    }
}



   then  published to local folder and copied whole published folder to httpdocs folder on remote folder .there was web.config file on httpdocs which did not replaced otherwise it did not work.

Client Deployment:   i changed the url in web.config.js from"http://localhost:4000" tohttps://www.virtualcollege.pk  then in client used"npm run build" command which produced dist folder on root :

 dist folder has two files;

1.index.html

2.main-bundle.js

  i uploaded both files to same httpdocs folder on remote server.the website works but front-end does not interact with back-end . .here is link of live website : https://www.virtualcollege.pk

the error is 404 for api call when port in url is :443

the error is "connection time out" for api call when port in url is 4000 . note the 4000 ,3000 both are opened by hosting provider in firewall.

thanks in advance for help.

regards 

fiaz ahmed ranjha

web.config urlmappings

$
0
0

We are using a urlMappings element in our web.config file and it works fine. My question is does the "url" setting have to point to an actual web page or not?  For example, in the section sample below does "~/misc/ReplySMS.aspx" actually have to exist as a physical page or will it thrown an error if it does not?

<urlMappings enabled="true"><add url="~/misc/ReplySMS.aspx" mappedUrl="~/SMSReplyHandler.ashx" /></urlMappings>

[Question] How does VS2019 deploy and avoid some destination directories be deleted

$
0
0

[Question] How does VS2019 deploy and avoid some destination directories be deleted

ASP.NET + WebForm + WebApplication

Visual Studio 2019 deploy, I set :
"Target location" : D:\WWW\WebApplication1
"Delete Existing Data" : True

I don't want "Delete Existing Data" : False, because it will not overwrite old .aspx by new .aspx.

But I hope D:\WWW\WebApplication1\Upload will not be deleted.
Where can I set it?
Thank you very much.

Configuring Distributor in SQL Server 2016

$
0
0

Hi all,

Am new and self learning MS SQL Server 2016. am having challenges with the following errors and cant find a way around this when configuring distributor, kindly assist.. Thanks in advance..

TITLE: Configure Distribution Wizard
------------------------------

This wizard will close because it encountered the following error:

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=15.0.18338.0&EvtSrc=Microsoft.SqlServer.Management.UI.WizardFrameworkErrorSR&EvtID=UncaughtException&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Could not load file or assembly 'Microsoft.SqlServer.Replication.dll' or one of its dependencies. The specified module could not be found. (Microsoft.SqlServer.Rmo)

------------------------------
BUTTONS:

OK
------------------------------

Server error in 'Directory; Application

$
0
0

I got an error: 
The parameters dictionary contains a null entry for parameter 'k' of non-nullable type 'System.Int32'

Can I confirm that the subdirectory can be access via directory/k/2 or directory?k=2

Please advise thanks.

Btw, can I check if 4.0.30319 and ASP.NET Version : 4.7.3650.0 is up to date?


Web Application Testing

$
0
0

Hi there,

I am working on a web application running on IIS Web Core.

The details error info is IIS Web Core

Notification is Authentication Request

The handler is PAge HnadelrFactory-ISAPI-4.0_64bits.

The problem is I can't replay the request through Firefox Edit and Resend.

Please advise.

Help me to deploy my first asp.net core mvc website.

$
0
0

Hello, I have developed an asp.net core 3.1 website, and now my client has provided me with some information to deploy the website to his server.

The database I used is MSSQL but he has provided me with MySQL admin panel, can I convert my DB? Plus, the FTP server seems linux based too (from URL), kindly help me to deploy my first project successfully, I have no experience in deployment. Thanks

Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Access is denied.

$
0
0

i have developed a web application by using visual studio 2008 in the year 2012 and  deployed it on webserver. It was working fine till now. My hosting company did some upgradation before 5 days since than i am facing the issue . i am getting the following error message 

Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Access is denied.

i have added reference of "System.core" assembly build it and uploaded bin folder again on server but sill the issue is as it is.

please guide

Deploy ASP.NET MVC WebApplication on FireBase

$
0
0

Hello,

I want to publish/deploy my web application [ bin/dll files - views - assets - Global.asax - webConfing] to Google Firebase...

I followed many steps but I saw it is just for Html/CSS/Javascript.. 

Some subjects they mentioned to deploy the web application from CLI through some commands, but also not working.

if someone please help me with clear steps and if I can do it?   or firebase is not providing deploy asp.net mvc web application files

web.config and ODBC Driver 17 for SQL Server

$
0
0

I am using the standard sqlclient in my web.config on my web server running on windows 2016 server. I have installed the odbc driver for sql 2017 on the web server (64 bit) so that it can connect to my sql server 2017 (64 bit). How do I get the web.config to talk using the correct driver as it is not working?

Deploy to remote server

$
0
0

Hello, i am able to deploy my asp.net web app to localhost via IIS but when i am trying to use an ip address(e.g my ip address) instead of localhost i have an error "cannot connect to remote server , and to make sure that web deploy and web management service is started"..but in windows 10 pro i cant see the icon Management service in IIS Manager...Can someone tell how to deploy my web app to remote server? thanks a lot

publishing Razor pages in local folder

$
0
0

Hi Friends,

I apologize for being new to Razor pages development I am still learning, I have a question. Whenever I  publish my application in release mode in a local folder the Pages folder where my application pages resides  is not published... I always have to copy the Pages folder manually. How can I do it automatically? Do I need to put the  Razor Pages files and their .CS files together? can I compile the .CS files and just  have the .CSHTML files 

Thanks.

Imran Jalali.


Custom App Pool not working

$
0
0

By default all sites of the the same framework will use the same app pool definition from the applicationhost.config. I have 2 ASP .Net 4.6.2 web apps that require an environment variable to be set for a 3rd party process they both use, but I can't just set them globally as they need to be different. Our current solution is that we set them up in IIS then attach to the process when debugging. There is many more weird steps we have to take and troubleshoot when things don't work that I've resolved by switching to IIS Express except for 1. I can't get Visual Studio to honor the app pool setting in the applicationhost.config file

<applicationPools><add name="TenantAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /><add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /><add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /><add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /><add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /><add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" /><applicationPoolDefaults managedRuntimeVersion="v4.0"><processModel loadUserProfile="true" setProfileEnvironment="false" /></applicationPoolDefaults></applicationPools>
<site name="Tenant" id="2"><application path="/" applicationPool="TenantAppPool"><virtualDirectory path="/" physicalPath="[full physical path]" /></application><bindings><binding protocol="http" bindingInformation="*:54399:localhost" /></bindings></site>

However when I start debugging I get a refused connection response and the command line column in task manager shows the following

"C:\Program Files (x86)\IIS Express\iisexpress.exe"  /config:"[correct path to applicationhost.config]" /site:"Tenant" /apppool:"Clr4IntegratedAppPool"

Is this a bug or am I missing a step to get Visual Studio to honor the applicationPool attribute in the applicationhost.config?

Running Visual Studio Professional 2019 Version 16.7.5 latest update as of posting

publishing issue

$
0
0

I'm having issues publishing my application that i created its a simple application adding data to a sql DB.

I keep getting this error I have no idea what could be causing this error. Does anyone have any ideas?

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This<customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration><system.web><customErrors mode="Off"/></system.web></configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration><system.web><customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/></system.web></configuration>

How to upload project for Appache Server

$
0
0

Hi,

There is a Apache server.

How to upload project for Appache Server

Untitled

Web Application not working when copied to another drive

$
0
0

I have a VS 2017 Web Application project.

When the project is copied to my local C drive and I debug it using IIS Express, it runs fine and everything is all well. When I publish the site, it also works fine.

However when I copy the project to a shared drive on the network, it fails to debug with an error in the webconfig which references my AccountProfile class which I have used to replace the Profile as it isn't available in Web Application projects.

<profile inherits="AccountProfile"><providers><clear /><add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer" /></providers></profile>

Here is my AccountProfile class in the AppCode folder

using System;
using System.Web;
using System.Web.Profile;

public class AccountProfile : ProfileBase
{
    static public AccountProfile CurrentUser
    {
        get
        {
            return (AccountProfile)Create(HttpContext.Current.User.Identity.Name);
        }
    }

    [SettingsAllowAnonymous(false)]
    public string MyStaffCode
    {
        get { return (string)base["MyStaffCode"]; }
        set { base["MyStaffCode"] = value; Save(); }
    }
}

The error I get is: Compiler Error Message: CS0246: The type or namespace name 'AccountProfile' could not be found (are you missing a using directive or an assembly reference?)

Any ideas?

Web.Config - URL Rewrite

$
0
0
<div class="comment-left-col">Hello</div> <div class="comment-right-col comment-body">

I need help.  I am trying to write a multiple URL rewrite rules.  I have this:

my website is broken down into 4 areas: Pages, News, Articles, Search.  If a user clicks on a page, i.e., mydomain.com/pages/hello then the URL Rewrite would be mydomain.com/htmlpage.aspx?Q=Hello.  If the user clicks on an article. i.e. mydomain.com/article/usa-elections-2020 then the URL Rewrite would be mydomain.com/article.aspx?Q=usa-elections-2020.  If the user clicks on page 2 of News, i.e., i.e. mydomain.com/news/2 then the URL Rewrite would be mydomain.com/news.aspx?P=2.  and so on.  I need the XML code under the web.config file.  I have the following but only the first rule works:

<httpErrors errorMode="Detailed"></httpErrors>
    <asp scriptErrorSentToBrowser="true"></asp>
    <rewrite>
      <rules>

<rule name="HTML Page" stopProcessing="true">
          <match url="(.*)$"  ignoreCase="false" />
          <conditions>
            <add input="{URL}" pattern="/pages/(.*)" />
          </conditions>
          <action type="Rewrite" url="htmlpage.aspx?Page={R:1}"  appendQueryString="true" />
</rule>

<rule name="Article Page" stopProcessing="true">
          <match url="(.*)$"  ignoreCase="false" />
          <conditions>
            <add input="{URL}" pattern="/articles/(.*)" />
          </conditions>
          <action type="Rewrite" url="article.aspx?Q={R:1}"  appendQueryString="true" />
</rule>

</rules>
    </rewrite>

I hope this makes what I seek clear.  Please send me the exact code that works under GoDaddy Shared Hosting as they are so trouble makers.

Thanks

Awny

</div>
Viewing all 3561 articles
Browse latest View live


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