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

IIS Express self signed certificates.

$
0
0

Hi, I am making a web application and it needs to run under SSL.

For that reason, I have switched in Visual Studio the option SSL Enabled.

 Once I did that I got the following dialog box asking me if I want a self-signed certificate by IIS Express

I replied with Yes and  IIS Express generated a self-signed certificate that it has been added in my personal certificates, i have moved the certificate to Trusted Root Certificates as shown below 

 

Once I did that everything worked as expected !!!
I have to mention that at the time I have runned the following code : netsh http show sslcert 

and I have seen that IIS Express made bindings to the ports 44300 until 44399 

below are partially shown the results of my query 


Now the fun part starts, suddenly my pc shut down from kernel 41 error (probably a problem with my PSU (this is another story :) ))
when the computer restarts I try to use the SSLURL but I get the following error: ERROR_CONNECTION_RESET - the site does not even loads.

Therefore, I  re-run the command: netsh http show sslcert

this time I only got one binding as shown below :

Since my SSL website has a binding on a port between 44300 - 44399 the above binding is useless therefore i think I found why my SSLURL is not showing up.

Moving forward, I have decided that I have to manually bind the previously generated SSL certificate to the port that my website uses for this example lets say port 44314.

therefore I use the following command from CLI: netsh http delete sslcert ipport=0.0.0.0:44314

Once deleted the entry succesfully I tried to make a new binding using the following command :

netsh http add sslcert ipport=0.0.0.0:44314 certhash=7d5ca4a11949712b0a24685a13066f9c29c9c9ef appid={214124cd-d05b-4309-9af9-9caa44b2b74a}

Certhash and Appid are the ones' used before by IIS Express for my certificate.

I received the following error: 

SSL Certificate add failed,Error:1312
A specified logon session does not exist. It may already have been terminated.

I don't know how to move forward and I need my site to run on SSL (in the development environment). I have disabled and re-enable the SSL Option from the visual studio hoping to get again the message shown in the second picture of this post. Unfortunately IIS had never asked me again for a new self-signed certificate.

Ps: I have tried to repair IIS in an effort to recreate the bindings but that has not helped either.

Ps2: I tried the following command : IisExpressAdminCmd.exe setupsslUrl -url:urlofYourSite -UseSelfSigned  but is not working

Do I need to set up a FULL IIS?


Error on Building Checked-in Code

$
0
0

I'm currently getting an error when I try to build my checked-in code. Unfortunately, the error is very generic.... it only says "exited with code 1".

The is the entire error:

D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\PreBuild.csproj (43): The command ""D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\tools\NuGet.exe" restore "D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\MyProject\src\MyProject.sln"" exited with code 1.

I'm getting this error as well:

Other Errors

1 error(s)

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I already ran the command below, but no luck.  Any help is greatly appreciated. 

Install-PackageNuGetEnablePackageRestore

Web.config runtime/legacyCorruptedStateExceptionsPolicy setting not working

$
0
0

I currently working in a solution in Visual Studio 2017 that runs in IIS 10.0.14393, the main project of the solution is C# in .net 4.6 framework, but it also references managed and native C++ projects.

I need to catch memory access violation exceptions thrown by the native C++ code in the C# code,  for that if I use the HandleProcessCorruptedStateExceptions attribute in specific methods it work, but I need to do it over the whole project in a global way. To do that the documentation says that using <legacyCorruptedStateExceptionsPolicy> element in the web.config is enough to be able to catch those exceptions in C#. I added the element in my web.config:

<legacyCorruptedStateExceptionsPolicy enabled="true"> 

But this didn't change any behavior in the solution, I tried multiple ways of adding it, but I had the same result.

I researched on different forums to see if someone had the same issue, and what I found was that another person had the same issue but no answer...

https://social.msdn.microsoft.com/Forums/en-US/4fa37186-79e7-4270-92b7-afe7e3e15c79/does-webconfig-support-runtimelegacycorruptedstateexceptionspolicy?forum=clr

https://forums.asp.net/t/2017975.aspx?Problem+with+web+config+and+runtime+legacyCorruptedStateExceptionsPolicy+setting

Any clue of what can I do to use this?, or any alternative to catch native exceptions in managed code globally?

Thanks!,

Nacho

HTTP error 503 and inetmgr went missing

$
0
0

<br>
I am running Windows 10 Pro (10.0.16299). IIS Manager missing and web app returns HTTP error 503<br>
<br>
I am running IIS Manager 7 as a web server for my web app. The default MSFT web site comes up but my web app returns error 503. Tried to find iis manager, but it is nowhere to be seen. I see it in control panel but double-clicking does not start anything. This was
working last Friday and it is not on following Tuesday.

Our IT installs patches using some other way, I am not able to Windows Update. In Windows Features, teh checkboxes are checked, seems to imply it is installed. Tried to uncheck those to remove and add them back, but the removal returned error 0x80073712. Running .NET Framework 4.7. Any thoughts would be helpful. If I can start it up, maybe fix it.

Hosting ASPNETCore sub-application under ASPNET website

$
0
0

I have 2 applications, let's say it a parent application and child application.
Parent application is developed in ASP.NET MVC 5 targeting to .NET Framework 4.6.2 and is hosted in IIS and running successfully on server.
Child Application is developed in ASPNET Core.
Now, I am trying to host the child application under my parent application. So far I tried, and I am able to host it under parent application. Means, whenever I browse my child application without authenticate, system is redirecting me to the parent application login page. Till here everything is working.

Now after Authentication, when I go to my child application request is not hitting to my application.

Any help will be appreciated.

Thanks in advance.

Anand Neema

Copy ASP.NET WebForm Website with SQL Database

$
0
0

Hi I did a project for college where I had to design and create a Auction Website using C# ASP.NET Webform with a SQL Database Connected to store all the data from the website.

What I want to know is how do I copy the Website with all the pages and the SQL Database to hand it in for my college.

Do I need to publish it or is it just copy and paste or is there something specific I need to do?

I did copy and paste the Database and website to my laptop but the problem then was the database didn't work and my SQL on my laptop also didn't want to read he Database, this is why I'm asking for help.

Any help would be really appreciated.

The page was not displayed because the request entity is too large.

$
0
0

We have a website to allow customers to upload up to 7 images.  If the total size is large we get the above error.  I looked up the error and it was suggested to add the line below to the web.config file.  When I did that the website blew an http 500 error with no trace of why. If I took the line out of web.config the error 500 went away.  What can I do to fix this and also, is there a way in js or jQuery where I can check the size of files before uploading?

<serverRuntime uploadReadAheadSize="10485760" />

Failure to publish asp.net web application because of thumb.db cannot be found

$
0
0

Hi,

when I try to publish my asp.net web application, using visual studio 2015,  to the Web Server on which I am hosting the web application,  I get the following error..

Error : Copying file MyImage\Thumbs.db to obj\Release\Package\PackageTmp\MyImage\Thumbs.db failed. Could not find file 'MyImage\Thumbs.db

And the publication fails because of that.

It all (being able to publish) used to work, but it has suddenly giving error. Not sure what went wrong. can you please help ?

Thank you


Website won't come up

$
0
0

I have been working on and testing an asp.net website on our local IIS server (Windows Server 2016).  Today when I enter the URL in my browser nothing happens.  It just spins a wheel on the browser tab but the site does not display.  I looked at the Windows Application log on the server and it shows nothing.  How can I figure out and correct the reason for the website to "hang"?

When Publishing the WebService using the VS 2015, the generated files is type is "ASP.NET Web Service", Whereas it supposed to be "ASMX" FIle

$
0
0

I have observed that the when publishing a web service using VS 2015: Publish -> Publish Web Application, I selected the directory where the published files are generated to. The thing I observed is that in the tutorials, the generated Web Service file type is just shown as "ASMX File' (As shown on the photo),

Whereas the file I get is "ASP.NET Web Service" (As shown in the pictures):

 

The Web Service works perfectly when run in Visual Studio. However, when try to deploy it on the IIS, it is not working at all. So, Where is the problem?

Publish Only Changed file

$
0
0

Hi, 

I developed my website in asp.net core, I published it successfully to hosting. After that I made small changes in my website. so i need publish all file again to hosting server or just a updated one. 

My project is almost 200mb. It's not possible every time to upload project. its takes long time. 

is there any solution on this  ? 

Thank You, 
Prathamesh

Assertion at debugger-agent.c:1648, condition `*endbuf

$
0
0

I have a project on ASP.NET Web API 2, and working on it with Rider (2018.3.4). I tried to debug it, but the mono xsp4(which is the server used to host the API locally) server is crashing ... Here is the log link

https://pastebin.com/b8rerDL8

Issues running Powershell from ASP.NET Site on IIS after migrating from 2008 to 2016 server

$
0
0

Here are my errors:

Access is denied
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.ComponentModel.Win32Exception: Access is denied

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.

Stack Trace: 


[Win32Exception (0x80004005): Access is denied]

[UnauthorizedAccessException: Access is denied]
   System.Management.Automation.Utils.NativeFileExists(String path) +21935502
   Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound) +103
   Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name) +2411
   Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord() +664
   System.Management.Automation.CommandProcessor.ProcessRecord() +755

[CmdletInvocationException: Access is denied]
   System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) +22072530
   System.Management.Automation.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) +766
   System.Management.Automation.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) +603
   System.Management.Automation.PowerShell.CoreInvokeHelper(PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) +739
   System.Management.Automation.PowerShell.CoreInvoke(PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) +746
   System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) +142
   System.Management.Automation.Runspaces.InitialSessionState.ProcessImportModule(Runspace initializedRunspace, String name, PSModuleInfo moduleInfoToLoad, String path, HashSet`1 publicCommands) +674
   System.Management.Automation.Runspaces.InitialSessionState.ProcessImportModule(Runspace initializedRunspace, IEnumerable moduleList, String path, HashSet`1 publicCommands, HashSet`1 unresolvedCmdsToExpose) +364
   System.Management.Automation.Runspaces.InitialSessionState.BindRunspace(Runspace initializedRunspace, PSTraceSource runspaceInitTracer) +524
   System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper() +808
   System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall) +389
   InfrastructureManagementSystem.Estate.EditMDTEntry.RunScript(Object sender, EventArgs e) in E:\*********************.aspx.cs:254
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11758848
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5028

The code works fine when I run it from source in VS, but once it gets pushed to the IIS server, the script never completes. Any help would be appreciated.

Button not working code behide when publish to server 2019

$
0
0

i publish my web to server 2012 it not Problem.

but when i publish to serverv to 2019 button not working ti code behide

help me please

thank you sir.

Best regards

Nattiko

Cloud service and Web development

$
0
0

I've been looking for the best cloud service and web development providers for a long time.
Please suggest the best development developer..


Thanks!


Server Error in '/' Application - Runtime Error

$
0
0

Hello:

I'll first say that I'm not a ASP programmer, I'm just trying to help someone out if I can. When I went to the site this error appears instead of the standard homepage. What's after the homepage is all the backend admin area. Now the standard homepage doesn't even work. Can someone help me to figure out why the homepage won't even appear? I've included the errors that show up.

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

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

Visual Studio Webpage works locally but not when deployed to Godaddy

$
0
0

Hi, i have been struggling with this for days.

I am new at asp.net but i have created a VS Website. Locally it seems to work when i view in browser but when i deploy to GoDaddy i get the following error. I have no idea how to fix this. And am in desperate need of help. I have searched this but am totally confused at this point, nothing seems to work

Server Error in '/' Application.


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)

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.Data.SqlClient.SqlException: 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)

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.


Stack Trace: 

[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: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) +907
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +334
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +699
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +89
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +426
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +191
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +154
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +21
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +90
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +443
   System.Data.SqlClient.SqlConnection.Open() +96
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +120
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +86
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1474
   System.Web.UI.WebControls.Repeater.GetData() +232
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +208
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +62
   System.Web.UI.WebControls.Repeater.DataBind() +77
   System.Web.UI.WebControls.Repeater.EnsureDataBound() +58
   System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +15
   System.Web.UI.Control.PreRenderRecursiveInternal() +88
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

My web.config file looks like this

<?xml version="1.0"?>

<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>
<connectionStrings>
<add name="SkyConnectionString" connectionString="Data Source=xxx\xxx;Initial Catalog=xxx;Persist Security Info=True;User ID=xxx;Password=xxx"
providerName="System.Data.SqlClient" />
</connectionStrings>

<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>

<system.web>
<compilation debug="true" targetFramework="4.7.2"/>
<httpRuntime targetFramework="4.7.2"/>
<trust level="Full" />
<customErrors mode="Off" defaultRedirect="mycustompage.htm"/>
</system.web>


<system.codedom>

</system.codedom>

<system.webServer>
<directoryBrowse enabled="true" />
<httpErrors errorMode="Detailed" />
</system.webServer>


</configuration>

This is the code on the page when it errors. This is simplified, but the error i think is coming fro the repeater, because as soon as i comment out the highlighted line, i dont get the error, but without the repeater how would i show the repeating data

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
This is a test

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SkyConnectionString %>" SelectCommand="SELECT * FROM dbo.table1"></asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" >

</asp:Repeater>

</div>
</form>
</body>
</html>

What am i doing wrong. I want to connect to my database on my laptop as the source for the data on the GoDaddy site

Move/Export a website

$
0
0

I have a website (not the web app) that I want to copy from a server to my machine so I can modify and test locally.  In the IIS, I do not see an option to Export, how do I Export the site or make a copy on my local machine?

Lidia

$
0
0
Arreglar mis errores de dirección

Converting Project to WebApplication, How do I access regular HTML components?

$
0
0

Since creating a "Website" seems to be dead, and unsupported, but also because my website isn't far enough along to totally rule this out, I want to convert my project over to a WebApplication. Which I think I'm almost done.

Unfortunately I have over 500 errors, all of them being "does not exist in the current context".
This is because I do all my front end in BootstrapStudio, and not in visual studio, so I have regular HTML code.

In my my "Website" project, I was able to reference these regular HTML components, as long as they have "runat="server"" as an attribute, but apparently this is not supported with Web Application.


Main Question:

I really don't want to have to add "asp:" to every HTML component I want to use, every time I import my HTML from BSS, so is there anything I can do, to allow myself to access and edit these regular HTML components?



I suppose I could write a program that automatically add's these to every component with runat="server", but if I remember correctly, there are certain HTML components, that are either not in ASP.net, or partially different, as well as it being a total pain in the ass to have to do every import, even if it's not as bad as doing it manually.

Edit: I just remembered, asp.net does buttons as "asp:Button," where html is just "input," and an input could be a button, textbox, and other things... So that probably makes it impossible to do automatically.

Viewing all 3561 articles
Browse latest View live


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