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

Use EMail From Hosted Site

$
0
0

I have deployed ASP.Net Authentication with email confirmation for registration on my MVC site, hosted at GoDaddy. I am still trying to learn about the email functionality, especially where hosting vendors are concerned. To illuminate my problem, I have placed all mail settings as config elements so my "SendMail" action can be easily modified, without having to re-publish to make minor changes in a controller action or other c#:

<mailSettings><smtp>  <network host="smtp.zoho.com" port="465" enableSsl="true" userName="admin@docscost.com" password="*******"/></smtp>    </mailSettings>

...this gives me a timeout error, "the connected party did not properly respond after a period of time...". So far, all I can glean from reading various threads online is that the host server prevents secure connection with external mail servers. Correct or not?

<mailSettings><smtp>  <network host="relay-hosting.secureserver.net" port="25" userName="admin@docscost.com" password="*******"/></smtp>    </mailSettings>

...this setting uses the host's own server, and with my MX records in place to proxy my mail vendor (zoho), the emails do implement and are delivered (testing with my own gmail acct) but with HEAVY Spam warnings on the message and the "Confirm" link contained in the email, port 25 being the [unsecured] culprit. Obviously that's NOT the result I'm looking for where users "Register" and expect an email to confirm registration.

zoho tech (very helpful) is at a loss on why they are not accessible by the first settings above. They have also concluded it must be on the host end. As for GoDaddy, I'm not able to get clarification as to whether this is an issue ofa) not allowing the outside mail vendor to be configured, b) an alternate coding to solve the issue, or c) I have to use INTERNAL mail they provide, but that it would solve the issue. I'd be glad to go the (c) route if I knew it would work.

If anyone has had a similar experience, or has any knowledge base, or can point me to documentation to clarify this, please advise. Thanks much for looking.

RC


Automate deployment

$
0
0

Hi
Hope I post the right place..

Im developing a app with very sensitive data. So I can't make it like a multi tenant app, and decided to go with multi instances.
But I want to automate the process, so I don't have to manually create the site when a user signs up.

Is it possible from C# to publish a new instance of the app to a subdomain when a user sign up on the website?

Thanks :-) 

Assembly Interning & VisualStudio SDK on a Production Server

$
0
0

Appologies if this is being posted in the wrong forum....

We have a production windows server running our ASP.net app on which we would like to make use of the aspnet_intern command to incorporate Assemble Interning to optimise our DLL usage.

Reading through the microsoft docs : Look at Sharing Common Assemblies in ASP.NET 4.5 it says that this feature requires the VS 11 SDK, which appears to be an optional feature install during the VisualStudio setup.

So my question is this....

I don't really want to install Visual Studio on the production server, I suspect that it comes with overheads which might affect the running of the server.

But I do want to use aspnet_intern, so is there a way to do this without installing VS ?

would anyone care to comment on this?

Duplicate application

$
0
0

In order to create a test site,I am trying to duplicate a web form application installed on iis 8, under a different name, without having to reinstall the app.

I copied the folder and then I right-clicked the virtual folder in IIS Manager and selected "convert to application".

The problem is I cannot seem to work in parallel. I tried to login to the production app and then I was logged out in the test app.

I have no idea why. I even tried logging in with different users in parallel. Any idea why?

Thanks

Connection string in web.config

$
0
0

I stored connection string in web.config file in which including server name, user name and password.

Also, I use publish way to compile asp.net apps to web server.

But, IT people said that web.config file need to be encrypted.

Questions.

1) How to encrypt web.config?

2) Is there another way to store connection string?

The application throws 503 Service Unavailable during deployment.

$
0
0

Hi

I use "Web Deploy" in visual studio to publish my asp.net mvc application. But during the deployment, the app throws "503 Service Unavailable" and it continues one or two minute after the deployment. IS there a way to overcome this ? For example switching to another application pool during deployment ? 

access violation exception

$
0
0

Hi,

We have as Asp.net Application hosted over intranet and working on .Net4.5 Application Pool. It keeps on crashing abnormally in some time duration (not definite), It can be twice in a day or once in a day or 3 to 4 days. I have used the debugdiag tool to trap the error and seem that my w3wp.exe is crashing with access violation exception (0xC0000005) when trying to read from memory location 0x00000000 , Can anybody give some more information on this.

Full Call Stack

<div id="CrashHangAnalysis:4444:45-s" style="display: block;">

Thread 43 - System ID 5408

Entry point  clr!DllGetClassObjectInternal+ecd0
Create time  6/12/2020 6:20:14 AM
Time spent in user mode  0 Days 0:0:4.875
Time spent in kernel mode  0 Days 0:0:0.406


Full Call Stack

Function    Arg 1    Arg 2    Arg 3    Arg 4  Source
System_Web_ni+1f8160    15f573b8    00000001    073b74b8    00000000  
System_Web_ni+1f81ac    00000000    073b74b8    0e349528    1614ec98  
System_Web_ni+1f81f4    00000000    00000000    670d6370    09e92be9  
System_Web_ni+200c27    00000001    073b74b8    00000001    00000000  
System_Web_ni+200815    00000001    0d4d4194    0d4d4194    073422ec  
System_Web_ni+200749    073b74b8    1614ed30    672906db    00000000  
System_Web_ni+2006f7    00000000    0734144c    0734a0e0    1614ed78  
System_Web_ni+2006db    00000002    1614ec9c    1614f048    746eec90  
System_Web_ni+20383d    0734144c    07346a84    1614edbc    1614edc8  
System_Web_ni+1dcd81    0335a4dc    00000010    ffffffff    00000000  
System_Web_ni+1dcdd8    1614ee74    00000000    00000000    07352424  
System_Web_ni+1ea9cd    00000000    00000000    1614ef04    1614ef10  
System_Web_ni+1dd760    0d509784    1614eef8    1614efb0    30f13fb6  
System_Web_ni+1e960b    0734144c    30f13fb6    7417fb10    1614f530  
System_Web_ni+1de5d0    00000000    0000000b    00000002    00000000  
System_Web_ni+1de2bf    155312fc    011d70fc    0000000b    00000000  
webengine4!MgdGetServerVariableW+273    011d79a8    6ebcb360    00000000    01eaf904  
webengine4!MgdFlushCore+285    00000080    00000000    01eafd84    011d6160  
webengine4!MgdGetServerVariableW+212    00000080    00000000    01eafd84    011d6158  
webengine4!MgdWebSocketWriteFragment+b48    011d6158    011d6160    011d6158    020a09f8  
iiscore+27ba0    01eafd84    011d6158    00000000    011d6160  
iiscore+26dfb    00000000    00000000    00000000    00000000  
iiscore+15ba4    00000000    00000000    00000000    00000000  
iiscore+28885    00000000    00000000    00000000    00000000  
iiscore+281ee    00000000    00000000    00000000    00000001  
iiscore+1a439    00000000    00000000    6ebb93a0    00000000  
iiscore+19440    00000000    1614f61c    6ec47e60    1614f51c  
webengine4!STRU::Unescape+49d    00000000    01e92c80    1614f55c    672c0e31  
webengine4!MgdIndicateCompletion+22    011d70fc    1614f61c    30f13fb6    7417fb10  
System_Web_ni+230e31    30f13fb6    7417fb10    1614f738    670c8640  
System_Web_ni+1de773    00000004    0000000c    01e92c80    00000000  
System_Web_ni+1de2bf    01e92c80    1614f6f8    7429c9b1    1614f858  
clr+ed3c    1614f858    00000010    01fcde08    15554590  
clr!GetPrivateContextsPerfCounters+c7d1    1614f7ec    244652f5    155545a6    00000002  
clr!GetPrivateContextsPerfCounters+c702    00000002    7429c940    1614f7ec    00000001  
clr!GetPrivateContextsPerfCounters+c66a    00000000    011d70fc    0000000c    00000004  
webengine4!MgdGetServerVariableW+273    747f2320    01ee3140    011d70fc    1614f8d4  
webengine4!MgdGetServerVariableW+2d3    011d70fc    24465da9    747f2320    741fdc20  
clr!DllGetClassObjectInternal+dd52    1614f905    1614f907    01e92c80    0001000c  
clr!LogHelp_TerminateOnAssert+8dab    00000000    ffffffff    ffffffff    772d59e4  
clr!DllGetClassObjectInternal+ed21    01eacab0    76fa69f0    2725ca02    1614fcc8  
kernel32!BaseThreadInitThunk+24    01eacab0    27187561    00000000    00000000  
ntdll!RtlInitializeExceptionChain+8f    ffffffff    772afe63    00000000    00000000  
ntdll!RtlInitializeExceptionChain+5a    741fed40    01eacab0    00000000    00000000  
</div>
<div id="CrashHangAnalysis:4444:45-s" style="display: block;">
In w3wp__.NET v4.5__PID__4444__Date__06_12_2020__Time_06_20_55AM__493__First chance exception 0XC0000005.dmp the moduleC:\Windows\assembly\NativeImages_v4.0.30319_32\System.Web\f9d354613858eb511f448a21c41ecb81\System.Web.ni.dll has caused anaccess violation exception (0xC0000005) when trying to read from memory location0x00000000 on thread 43


Module Information

Image Name:C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Web\f9d354613858eb511f448a21c41ecb81\System.Web.ni.dll  Symbol Type:None
Base address:0x00005a4d  Time Stamp:Sat Nov 23 07:49:08 2019
Checksum:0x00000000  Comments:Flavor=Retail
COM DLL:False  Company Name:Microsoft Corporation
ISAPIExtension:False  File Description:System.Web.dll
ISAPIFilter:False  File Version:4.7.3535.0 built by: NET472REL1LAST
Managed DLL:True  Internal Name:System.Web.dll
VB DLL:False  Legal Copyright:© Microsoft Corporation. All rights reserved.
Loaded Image Name:System.Web.ni.dll  Legal Trademarks:
Mapped Image Name:  Original filename:System.Web.dll
Module name:System_Web_ni  Private Build:DDBLD340C
Single Threaded:False  Product Name:Microsoft® .NET Framework
Module Size:13.33 MBytes  Product Version:4.7.3535.0
Symbol File Name:System.Web.ni.dll  Special Build:&
</div>

EXport Data into EXcel more than 30 mb size not working

$
0
0

Hi,

I have a ASP.net framework 4.5 and IIS version 10.0.My application is deployed in  IIS 10.0.My application is hang and  not responding,When I try to export 70 MB data to Excel from My application in IE 11.Howver noticed that, I am able to export the max 20 mb data to excel in same application in IE 11.How can I resolve this problem and export large size data to excel.

Note: Able to export same 70 mb data  to excel when I run my application with Visual studio 2013 with default IISExpress.

Thanks & Regards,

Dileep S


Configure a timeout in web.config for a web service

$
0
0

Hello everybody,
I have a web service hosted in IIS 7.5.
The web service works fine.
I try to configure a timeout in the web.config, but I can't do it.
I tried in my web.config :

<Configuration><system.web><compilation debug="false" targetFramework="4.8" /><httpRuntime targetFramework="4.8" executionTimeout="10" /> <!-- 10 seconds --><sessionState timeout="2" /> <!-- 2 minutes --></system.web></Configuration>

and in the web service controller :

Thread.Sleep(180000) //3 minutes

I thought the execution would stop after 10 seconds but instead it stops after 1 minute, whatever I put in the "executionTimeout" and "timeout" parameters.

I have searched in IIS but impossible to find what this minute corresponds to.

Does someone have an idea ?

Thanks a lot in advance.

Eric.

The client failed to connect. when deployed in IIS

$
0
0

Dear All,

i have developed an application that used ndde to fetch real time rates. i managed to successfully show the rates in View (MVC razor). but when i deployed the application in IIS i am continuously receiving the following error;

The client failed to connect to "". Make sure the server application is running and that it supports the specified service name and topic name pair.

i don't  know whether this is because of some settings or some configuration issues. please guide me. i am totally stuck here.

with many thanks.

IIS 10: 503 Service Unavailable

$
0
0

Good day! I deployed a farm based on Windows Server 2019 in the RDS test environment. All components were installed successfully, but when I try to open the address with the rdweb collections, I get a 503 Service Unavailable error, I find out that this is a problem of the pool responsible for this, but it has a constant status works, where to dig and what's the problem?

Deploying asp.net web application

$
0
0

I had created asp.net c# web application and deployed it in my machine locally in the development server.

now, my organization has its own private cloud and uses 3 level architecture; Database server, application server and the webserver.

I need to publish the web application on the internet. my question is what are the files that need to be in the application server? what the files must be published on the web server?

can anyone help me and explains the steps to do that?

Thanks

How can i conditionally install a directory using Advanced Installer ?

$
0
0

I have under "Files and Folders"

Application Folder 

       Client Directory

       Service Directory

Is there a way I can conditionally install lets say Service Directory depending upon user selection of a checkbox ?

thanks

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?

element not working config when re-routing the user to the custom error page

$
0
0

Hi, I am trying to re-route the user to a custom error page I created. I tried <httpErrors> element with both absolute path and relative path. Both are working in LOCAL Config (web.config)but not working in the DEV region (web.config.dev). 

Absolute Path of the custom error page: https://dev.kog.ky.gov/helpdesk/customerrors/404.13/Default.aspx 

Relative Path of the custom error page: /customerrors/404.13/Default.aspx

The settings is as shown as below:

Absolute Path with "Redirect" response mode:

<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="13"/>
<error statusCode="404"
subStatusCode="13"
path="https://dev.kog.ky.gov/helpdesk/customerrors/404.13/Default.aspx"
responseMode="Redirect" />

Relative Path with "Redirect" response mode:

<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="13"/>
<error statusCode="404"
subStatusCode="13"
path="/customerrors/404.13/Default.aspx"
responseMode="Redirect" />


Aspnet_compiler / ASPRUNTIME Build could not find file in a ShadowCopy folder – Huh ??

$
0
0

Hi all,

I am using Visual Studio 2019 Web Deploy an ASP.NET MVC app with “Precompile During Publishing” (and not allowing site to be updatable).

During the Deployment Web Deploy calls the aspnet_compiler as follows:

3>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 C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\TempBuildDir

During that aspnet_compiler compilation  (or pre-compilation) I am getting the following error:

3>error ASPRUNTIME(0,0): Error message: Could not find file 'C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\DF65C9D81126DFE36C13305B42A62905'..

I currently have \App_Data\TEMP\uCommerceAppsAssemblyShadowCopy\  “Excluded” from project because  from what I understand it is only needed at run time to copy assemblies to so they can be opened from there, so as to avoid locking the master copies. This to allow for web site update as described at https://docs.microsoft.com/en-us/dotnet/framework/app-domains/shadow-copy-assemblies . 

Because it is “Excluded” from project this folder does not exist in the “Source” folder used as and input to aspnet_compiler.exe.  To be precise I checked and can confirm that the folder C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\  does not exist.

Further more a text search on the content of all files in C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source does not find any file or file name containing the string “uCommerceAppsAssemblyShadowCopy”

So given that the only input to  aspnet_compiler.exe is the physical path of the “Source” folder   ( -p C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source ), why does, and how does aspnet_compiler.exe even know to look for 'C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\DF65C9D81126DFE36C13305B42A62905'.. ?  Huh - does not make sense to me ?

Also note in the error message above one of the folder delimiters is a “/” while the rest are “\” why is that ? and is it a problem ?  Right now I am assuming it is not a problem because similar paths are opened by Windows Explorer without issue.

Also FYI for reference docs on aspnet_compiler.exe and related command line switches see  https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-3.0/ms227976(v=vs.85)  

Any assistance understanding or solving this problem would be appreciated...

Terry Clancy

ClanceZ


Terry Clancy

Web.config Routing within another Folder

$
0
0

Hello, I'm new to the world of windows webservers. I'm working on a project where i have one main site "site.com" and then a blog run on that site as well on "site.com/blog/". I'm having issues with the web.config file within the /blog/ folder. The routing is still taking all urls on /blog/ to "site.com". However, I'd like all traffic on "site.com/blog/xxx/" to go through "site.com/blog/index.php". So my question is how can I craft a web.config to complete this routing.

In .htaccess the web.config file within /blog/ would look like this:

RewriteEngine on

RewriteCond $1 !^(index\.php|images|robots\.txt)

RewriteRule ^(.*)$ /blog/index.php?/$1 [NC,QSA,L]

Can't resolve |DataDirectory| in web.config connection string

$
0
0

I want to use the |DataDirectory| substituion string for the path of my database file, because I dont't want to change the path after deployment. My Project is an ASP.NET Web API with .NET Framework 4.7.2. I am using Visual Studio 2019.

The following connection string for an sqlite database is stored in my web.config:

<connectionStrings><add name="sampleDB" connectionString="Data Source=|DataDirectory|\sample.db;Version=3;" providerName="System.Data.Sqlite"/></connectionStrings>

The database file is located in App_Data/sample.db. When I try to retrieve the ConnectionString:

ConfigurationManager.ConnectionStrings["sampleDB"].ConnectionString;

The value is "Data Source=|DataDirectory|\\sample.db;Version=3;" like the value in the web.config. I thought it will be resolved to the corresponding path of my App_Data folder. When I log this:

AppDomain.CurrentDomain.GetData("DataDirectory");

I receive the correct path of the App_Data folder. Does any one know why |DataDirectory| will not be resolved to the correct path?

Web deploy calling aspnet_compiler.exe which throws error: The type or namespace name 'UmbracoViewPage' could not be found

$
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

This results in a large number of warnings I do not yet understand, and am not worrying about these right now such as the following:

2>ASPNETCOMPILER(0,0): Warning CS1685: The predefined type 'System.Collections.Generic.IReadOnlyList' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll'

2>ASPNETCOMPILER(0,0): Warning CS1685: The predefined type 'System.Collections.Generic.IReadOnlyCollection' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll'

But the Error I AM worried about and need assistance with please is the following

2>c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b29e350b\ca96019b\App_Web_vivjsxxz.1.cs(25,0): Error CS0246: The type or namespace name 'UmbracoViewPage' could not be found (are you missing a using directive or an assembly reference?)

From what I can tell UmbracoViewPage  == Umbraco.Web.Mvc.UmbracoViewPage  and that exists in the assembly “umbraco.dll” which exists in my bin folder as well as in the obj location used by aspnet_compiler.exe  at C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\bin .  So I do not understand the reason why “  'UmbracoViewPage' could not be found  ” ???

 Also, how can I debug this !!!!  It says the error exists in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b29e350b\ca96019b\App_Web_vivjsxxz.1.cs(25,0)  which means nothing to me, and does not exist after the build fails and I go to look at it.   How can I tell what line, in what file, in my source code is causing this error ??

 Any help would be appreciated.

 

Thanks

 Terry Clancy

ClanceZ

Help migrating website

$
0
0

Hello,

I try to migrate a website i didn't create.

It's a C# website. it was on Windows 2008 Server with IIS, i try to put i on Windows 2019.

It seems to work but i have an issue. I'm not a dev :)

i have this code : 

if (Thread.CurrentPrincipal.IsInRole(@"SOME_AD_GROUP") || Thread.CurrentPrincipal.IsInRole(@"SOME_OTHER_AD_GROUP"))
        {

            
        }
        else
        {
            Response.Redirect("/NonAutorise.aspx");

        }

it's working on the old server, on the new, it 's not, i have no error, but it think i'm not in the AD group (i am in !) and i have an unauthorized access.

i would like to know how it works ? Maybe it needs me to install something ? i was thinking on AD admin features, but i haven't it on the old server.

Thank you in advance :)

Johan

Viewing all 3561 articles
Browse latest View live


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