1
Answer

The type exists in both App_Code and Website.

Hi,<br />I have a website open in Visual Studio 2015 which were developed in Visual Studio 2005. <br /><br />I have build it and getting below error-<br />The type &#8216;Log&#8217; exists in both 1_App_code, version=0.0.0.0, Culture=neutral, PublicKeyToken=null&#8217; and &#8216;WebMail, version5.0.0.0, Culture=neutral, PublicKeyToken=null&#8217;<br /><br />I am using Log.cs file for logging purpose and file available under App_Code folder.<br /><br />Please suggest.<br /><br />Thanks.
Answers (1)
0
sumeet yadav

sumeet yadav

NA 2 0 13y
mahesh start method willbe called once or it will run like looping untill i dont stop sevice
0
Mahesh Chand

Mahesh Chand

2 286.4k 123.7m 14y
Here is an article that shows you how to build a Windows Service. Instead of writing to a text file, you will write your code to send email here.

Creating a Windows Service in C#


0
kalpa vachhani

kalpa vachhani

NA 34 44.3k 14y
Mahesh can u give any link that provide information about how to build service process
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 14y
Yes Mahesh is right, you should use other options instead of using a web application. Your problem occurring might due to Application Pool recycling.
0
Mahesh Chand

Mahesh Chand

2 286.4k 123.7m 14y
If your code is sending emails for 1 hour but not for 4-5 hrs, it seems like a bug in the code. Also, I am not sure if it is a good idea to put your send email code in the Global.asax file. You should either build a service or a job process (separate exe and schedule it as a job) or create a job in SQL Server.

BTW Restarting server does not need you to restart IIS. IIS should automatically restart and so your application and so your Global.asax.