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

How can I use a PC on the local network as a web server for an MVC core application

$
0
0

Hi all,

I am working in a Veterinary Institute and writing a web-based app to connect institute's units (laboratories, sample acceptance, accountants etc.)

Instead of a ASP-NET web hosting I need to host the database (MySQL) and server in a local workstation.

I would be very pleased if you could explain how can I turn a local machine to a ASP-NET server.

thank you.


Structure of applications on IIS

$
0
0

I need help with learning how my applications are structured when I deploy my application to IIS. Right now, I have 3 solutions(A,B,C) that reference one central solution(Z) to get some config settings.

A,B and C are standard web applications that have references to one another.

Each application has this structure

  • A.UI
  • A.Data
  • A.ClassLibrary

Z is a solution that contains several classes only and no Program.cs or Startup.cs. It is referenced by A,B and C. I am not able to right click and publish this as it is just a bunch of classes.

When I publish A,B and C, I can see that in the output folder, there are many dlls containing the names of the referenced project. E.g B references A.Data

Does this mean I won't need to publish A, C and Z because the dll is already included in B?

If thats the case, what happens when I make an update to Z or A and C? Do I have to republish everything else?

I hope someone can explain this to me as I am really confused and new to deployment.

Good IIS host for my website

$
0
0
<div class="oSioSc"> <div id="tw-target"> <div class="gsrt tw-ta-container tw-nfl" id="tw-target-text-container">
Hello,
I am looking for a good European IIS host not too expensive, fast and with good advice.
Do you know one?
thank you
</div> </div> </div>

Deploying a site where DB and web application are on different servers

$
0
0

Good day,

We have a very simple web application that simply reads and writes data from a SQL server table. We would like to deploy this on a server within our domain while having the SQL server DB residing on another server within the same domain. 

We have created a SQL server authentication user and we have included it in the connection string of the web application. We have tried turning off the integrated security as well. We still cant get this to work.

The error message now (with integrated security set to false) is: login failed for user [domain name]/[server machine name + $]

I verified this using my own PC as a web server and tried to publish the web application on it. I get the same exact error message.

I should note that we only get that error message when the web application tries to access the DB.

We are able to publish asp.net web applications with ease provided that both the web application and the SQL server are on the same machine. But never in the scenario I explained. This is actually a trial for us to fix this once and for all. 

I have searched online and found solutions suggesting to grant permission to the machine name. Others suggesting adding the machine name to the AD. Not really sure which to try. I feel the solution is very simple but we're missing it. We did not try anything related to the AD or the IIS yet.

If anyone can help with this please let me know.

Process() is not working on IIS

$
0
0

Hi,

I was using below code to change password for windows account. This code is working in localhost and not in IIS.
I noticed in IIS, when i changed the DefaultAppPool identity to LocalSystem it is working. But, My app pool identity is ApplicationPoolIdentity. it is not working

Process QProc = new Process();
                // Do Something To hide Command(cmd) Window
                QProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                QProc.StartInfo.CreateNoWindow = true;

                // Call Net.exe
                QProc.StartInfo.WorkingDirectory = "C:\\windows\\SYSTEM32";
                //QProc.StartInfo.WorkingDirectory = filePath;
                QProc.StartInfo.FileName = "net.exe";
                QProc.StartInfo.UseShellExecute = false;
                QProc.StartInfo.RedirectStandardError = true;
                QProc.StartInfo.RedirectStandardInput = true;
                QProc.StartInfo.RedirectStandardOutput = true;

                // Prepare Command for Exec
                QProc.StartInfo.Arguments = @" user " + txtUserName.Text + "  " + txtPassword.Text;
                QProc.Start();

Server Error 401 - Unauthorized: Access is denied due to invalid credentials. The Connection to the Site is not private.

$
0
0

Hi Everyone 

I ve already searched for my scenario in this forum so please bear with me as I explain. 

I deployed my WebApp to the Test Server and the Production Server yesterday. 

I am able to access both the sites. 

My colleagues receive the error only on the Test Server and not Production  : Server Error 401 - Unauthorized: Access is denied due to invalid credentials. The Connection to the Site is not private. 

The code base is the same on both Test and Production. I did not change anything on the preexisting webconfig file in the Test environment. 

The Test WebApp used to work earlier with an older code base. 

Please help me understand why I dont see this problem but everyone else does in the Test Server and if it is IIS server thats the problem , it used to work earlier with the previous code base. 

Thank you in advance

General practice creating new .net server projects

$
0
0

Hi everyone,

I was wondering how do most people (especially for busines projects) go about creating new .net projects, especially large projects.

For example creating a new asp.net web server that needs database access, auditing and event logging possibly, logging, dependency injection, and all of that.

Do most people copy/paste from previous projects?
Do companies have their own visual studio templates (vsix) they can start from?
Are there online frameworks or libraries that one can use, maybe even need to pay for?

I'm interested in everyone's usual approach and also what your issues and annoyances are with this process.

Thanks in advance.

web.config file showing error while hosting in godaddy server

$
0
0

i have an web application which has to be hosted on godaddy server.

custom errors mode should be off.. error keeps coming..

the following is web config file

<?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>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime/>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
</compilers>
</system.codedom>
<appSettings/>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler"/>
</modules>
</system.webServer>

</configuration>

The following is my connection. cs file

public class Connection
{

public SqlConnection getConnection()
{
SqlConnection con = null;
String conString = "server=148.72.232.167;user id=student_db_uname;password=student_db_uname;database=student_db";
try
{
con = new SqlConnection(conString);
}
#pragma warning disable CS0168 // Variable is declared but never used
catch (SqlException ex)
#pragma warning restore CS0168 // Variable is declared but never used
{

}
return con;
}
}

The connection string is what is in godaddy connection..

but still the error persists.. can some one help me.. please


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!

Encrypt and Decrypt web.config on 2 servers

$
0
0

Hello Team,

I have imported and granted the access to RSA key container on both the machines, however the encrypted web.config is not able to decrypt the web.config on the second server. What could be the reason?

Used the following commands:

aspnet_regiis -pi "< name of Key container>" <Path for Keys XML file>

aspnet_regiis -pa "< name of Key container >" "NT AUTHORITY\NETWORK SERVICE" -full

I want to keep the web.config encrypted at both the servers at all time. Is it possible to have the same web.config on both the servers?

Kindly help resolve the issue or provide clarity on the above commands whether it is possible.

Thanks for your quick help on this.

Domain Name

$
0
0
Hello, we have a server with framework 4.5 with a domain name www.mycomany.com, now we had develop a new web app under 4.5, but we want to hide or found a way to change this
http://www.mycompany.com/mynewapp/login.aspx to some like this http://Alias/mynewapp/login.aspx, so we don not want to show the domain name, is this possible?

GoDaddy and ASP.Net

$
0
0

Hi. I know if I use Microsoft Azure services I can immediately deploy my app to the server from Visual Studio using Publish. Also, I know I can debug it with clicking the Run button. Does GoDaddy have the similar feature as Azure ? I want to be able to deploy my app straight from Visual Studio... I even want the database installed when I enable-migrations.

URGENT Problem in trying send email through godaddy hosting

$
0
0

Hi All

This is really urgent as my website is live. It was working perfectly till yesterday and today no emails are going thru. Simple when somebody click on contact us, in my code it sends email and its failing now and gives error

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 72.167.234.197:25

The code is right and has always worked.. pleas help. I called godaddy and they said theree must be something wrong with my code

Dim mailClientAsNew SmtpClient()

Dim mailMessageAsNew MailMessage()

mailClient.Host =

"relay-hosting.secureserver.net"

mailClient.DeliveryMethod = SmtpDeliveryMethod.Network

mailClient.Port = 25

 

mailMessage.From =
New MailAddress(txtEmail.Text, txtName.Text)mailMessage.To.Add("admin@mywebsite.com")

mailMessage.Subject = txtSubject.Text

mailClient.UseDefaultCredentials =

True

mailMessage.IsBodyHtml =

True

mailMessage.Body = txtMailBody.Text

mailClient.Send(mailMessage)

 

My webconfig settings are

<mailSettings>

<

smtp><networkhost="relay-hosting.secureserver.net" />

</

smtp>

</

mailSettings>

The most frustrating thing is it was working perfectly and never failed. PLEASE HELP. my users will kill me.

Outdated yarn lockfile error on deploying app on heroku

$
0
0

I have a working app run locally in node.js and for deployment, I signed up on Heroku and have connected GitHub to Heroku. But when I git push and ran the app, it says:

Application error. An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command

Then, I went to Heroku from the web browser and under "Manual deploy", I click "Deploy Branch" and get this list of errors:

----->Node.js app detected----->Creating runtime environment

           NPM_CONFIG_LOGLEVEL=error
           NODE_ENV=production
           NODE_MODULES_CACHE=true
           NODE_VERBOSE=false----->Installing binaries
           engines.node (package.json):  unspecified
           engines.npm (package.json):   unspecified (use default)
           engines.yarn (package.json):  unspecified (use default)Resolving node version 10.x...Downloading and installing node 10.15.1...Usingdefault npm version:6.4.1Resolving yarn version 1.x...Downloading and installing yarn (1.14.0)...Installed yarn 1.14.0----->Building dependenciesInstalling node modules (yarn.lock)
           yarn install v1.14.0[1/4]Resolving packages...
           error Your lockfile needs to be updated, but yarn was run with`--frozen-lockfile`.
           info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.----->Build failed!OutdatedYarn lockfileYour application contains a Yarn lockfile (yarn.lock) which does not
           match the dependencies in package.json.This can happen if you use npm
           to install or update a dependency instead of Yarn.Please run the following command in your application directory and check
           in the new yarn.lock file:$ yarn install$ git add yarn.lock$ git commit -m "Updated Yarn lockfile"$ git push heroku master

           https://kb.heroku.com/why-is-my-node-js-build-failing-because-of-an-outdated-yarn-lockfile!Push rejected, failed to compile Node.js app.!Push failed

I don't think i have yarn but the error did mentioned yarn.

krishi bihar me ragestion n ho para h

$
0
0

Server Error in '/' Application.Runtime ErrorDescription: 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>


trouble deploying to web host

$
0
0

Hi All,

Using Visual Studio Express 2013 for Web I have developed an ASP.NET web forms application based on the Wingtip toys example, but with VB code. I have recently upgraded it to Visual Studio 2017.  The application uses the ASP.NET identity database, and a second database that contains product and customer information. My question relates to what kind of ASP.NET host I need to host the website, and how the databases can (should) be published, along with the rest of the application, in such a way that the application can find them and use them.

Perhaps naively (and thinking that Azure was more than I needed), I signed up with a reputable ASP.NET provider with their most basic 1-website Windows shared hosting plan that supports ASP.NET 4.x, and published my application to the host using Web Deploy with the “IIS, FTP, etc” option selected, expecting that, since the application worked fine in localhost, and publish was successful, that my website would work. I can see that all my files uploaded successfully in Plesk, including the two databases in the App_Data folder.

But: I get a server error:

[Win32Exception (0x80004005): Access is denied]

[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: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)]

If I go to the Settings tab in Publish and enter a path (given to me by tech support and including the database filenames) to the two databases in ApplicationDbContext and UserContext, and Publish, I get another server error:

[ArgumentException: Format of the initialization string does not conform to specification starting at index 0.]

My connection strings in Web.config that work for localhost are:

    <add name="DefaultConnection" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Rob\Documents\Visual Studio 2013\Projects\LabEle3\LabEle3\App_Data\aspnet-LabEle3-20150324023533.mdf;Initial Catalog=aspnet-LabEle3-20150324023533;Integrated Security=True" providerName="System.Data.SqlClient" />

    <add name="LabEle3" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Rob\Documents\Visual Studio 2013\Projects\LabEle3\LabEle3\App_Data\LabEle3.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />

But: even when I change the path in the connection strings to what should work on the server, I get these same errors when I Publish.

Tech support says that I need to add the databases via Plesk, in order for them to be recognized. This appears to involve a field-by-field recreation of each table. Or, at 5X the price, I could buy a VPN account that would allow me to upload already-existing databases and register them and a user in Plesk from a command line via RDP. This all strikes me as odd, because a) I already have the databases on the website, inside the application, where they function just fine in localhost; b) I thought that one of the features of ASP.NET was that the databases were managed from within the application, so that I ought to be able to set settings within the application that would allow the databases to be functional when uploaded during Publish; c) there is a “code first” option in Publish Settings that is currently disabled, but could perhaps be enabled if I set up the application that way (?), that would use the T-SQL in the application to create the databases on-site (but would they then be accessible?); and d) I’m wary of trying to reconstruct (especially) the default database that is used by ASP.NET identity in Plesk. So before I undertake such, I would like to know:

  1. Am I in the right kind of plan for this kind of application? Do I really need a VPN plan?
  2. Is it really not possible to authorize my databases on the website without creating them manually in Plesk, in a shared hosting plan?
  3. Should the application be able to find and use the databases that are already there, simply by replacing my local path (C:\Users\Rob\Documents\Visual Studio 2013\Projects\LabEle3\LabEle3\App_Data\LabEle3.mdf) with the C:\ path to LabEle3.mdf on the server, in the Web.config connection strings? If not, what else is needed?

 

Guidance would be greatly appreciated!

MPT79

Could not load file or assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral

$
0
0

Hi, plz help me to come out from the below error in Asp.Net MVC 5

Could not load file or assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file 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.IO.FileNotFoundException: Could not load file or assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file 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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///F:/Projects/eMedi4You/eMedi4YouWebsite/
LOG: Initial PrivatePath = F:\Projects\eMedi4You\eMedi4YouWebsite\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: F:\Projects\eMedi4You\eMedi4YouWebsite\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Service Unavailable Issue occurring during the load time

$
0
0

Dear Frens 

Greeting for the day !!

here is the problem scenario !

we have configured ASP.NET based application on Windows  IIS server 10 , the hosting is Microsoft windows azure server , we have 2 different server for application and database 

while the user loads increased on the server, the server respond with "Service Unavailable" 

Since the Server Infrastructure is already at high end and not utilizing during the load time but still users are unable to use our website due to service unavailable error 

kindly help me in it 

System.InvalidCastException: [A]ProfileCommon cannot be cast to [B]ProfileCommon

$
0
0

Hi,

I have asp.net Ajax application. I have a load balance server A,B and C.I have just copied the entire project  to IIS virtual directory path.

When my application is working fine if my load balance server  is on A or C. but if my application on Load balance server B, getting an InvalidCastException , and the  error details as

follows as,

System.InvalidCastException: [A]ProfileCommon cannot be cast to [B]ProfileCommon. Type A originates from 'App_Code.gerhjby9, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site1\72113dc4\e9d65023\App_Code.gerhjby9.dll'. Type B originates from 'App_Code.exfj_hx2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site1\72113dc4\e9d65023\App_Code.exfj_hx2.dll'.

How can fix this issue?.

Thanks & regards,

Dileep

Getting intermittent w3wp.exe crashes (combase access violation) after upgrading environment

$
0
0

Hi,

I am having a hard time trying to isolate the root cause of this issue.

After upgrading our ASP application environment from Windows Server 2003/IIS 6.0 to Windows Server 2016/IIS 8.0 we got everything up and running, except for intermittent crashes in w3wp.exe: the assembly instruction at combase!CObjectContext::GetNextProperty+819be in C:\Windows\System32\combase.dllfrom Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read frommemory location 0x00000000 on thread 41

Tried to isolate specific pages that would cause it without success. Really in need of help now.

Some debug dumps are here: https://drive.google.com/drive/folders/12KddM2mFgJJR2hHX-7p1Vqutk-HE5huP?usp=sharing

Thank you very much. 

Viewing all 3561 articles
Browse latest View live


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