How To Write A Log On The Server

Jan 4, 2010

I want to write a log on the server. There are tens of users of this site and the records will be about several hundreds. Since the information I want to record is a little complicate, I wonder whether writing it to the system event log is proper. And also I want to show all records with details in file. Do I need to write it to another local file?

View 4 Replies


Similar Messages:

SQL Server :: Write Code Of Stored Procedure / Create Stored Procedure And Write Select Statement In It

Nov 23, 2010

how can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?

check the following code, this is what I want to write put I don't know where or how !

CREATE STORED PROCEDURE SP_CATEGORY

@CATEGORY VARCHAR(30)

AS

BEGIN

SELECT LATIN_NAME, ENGLISH_NAME, ARABIC_NAME, CATEGORY

FROM FLORA, CATEGORY_LIST

WHERE FLORA.CATEGORY=CATEGORY_LIST.CATEGORY_NAME AND CATEGORY_LIST.CATEGORY_NAME IN (SELECT * FROM SPLITLIST(@CATEGORY, ','))

END

where can I write this code ?!

View 5 Replies

Write A Application Which Connects To Remote Server(windows 2003 Server

Jan 17, 2011

I have to write a application which connects to remote server(windows 2003 server, open SQL Management studio in that server and enter a specific SQL Server address and access a stored procedure, change some values and execute the stored procedure.)

I have to write this application using C#.Net , Could anybody point me in right direction, Where do I start?

View 6 Replies

SQL Server :: How To Write Storeprocedure Update Special Character In Sql Server 2005

Oct 12, 2010

I am using Sql Server 2005,My table structure is below.

Create Table ComentTable(id int,coments varchar(4000))

insert into ComentTable values(1,'sanjay I don%27t Know Tamil Language')

insert into ComentTable values(1,'sanjay I don%27t Know Kanar Language')

how to write storeprocedure update coments column replace %27 to '

View 4 Replies

SQL Server :: Write The Value In All The Rows?

Nov 8, 2010

Below is the code for adding the value in a table, but the problem it is adding in one row only... how can I make it write the value in all the rows?

INSERT INTO Tools (SiteID)
VALUES (1)
WHERE Quantity = '1'

View 4 Replies

ADO.NET :: How To Get And Write Data To A DB Located On The Server

Jan 2, 2011

I have a silverlight client that i want to get and write data to a DB located on the server . now this is what i did :

1. created the silverlight projecte hosted in asp site project, with wcf enabled .
2. created a DB with some tables in it.
3. created linq to sql classes, and wcf service with operation to fetch data from the DB, added the project the referance .

result:

when i debug it locally on localhost, it workes perfectly, but when i upload all the content to the server i get an error, my guess is that the service is not finding the DB . after I uploaded the content, all i did was change the connection string in my web.config file to the one provided to me by the hosting server.
exception:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Fri, 31 Dec 2010 12:11:43 UTC
Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at MyProfile.ServiceReference1.GetMessagesCompletedEventArgs.get_Result()
at MyProfile.MainPage.webService_GetMessagesCompleted(Object sender, GetMessagesCompletedEventArgs e)
at MyProfile.ServiceReference1.ServiceClient.OnGetMessagesCompleted(Object state)
Line: 1
Char: 1
Code: 0

View 3 Replies

To Write .NET Script To Connect To SQL Server

Mar 24, 2011

I'm new to ASP.NET, as subject, how to use asp.net to connection SQL Server...

How to remote connect "localhostInstancename", for example connect 192.168.0.2/sqlserver2

View 1 Replies

AJAX :: Write A File At The Server?

Feb 9, 2010

I'm using Visual Web Developer 2008 Express with VB for coding and I'm really just a starter.

I want to use AJAX HTML editor to create an HTML page and then store this at the server.

I've got the HTML Editor set up but how do I "Save" the content as a file in a specific folder at the server?

View 13 Replies

SQL Server :: Subquery / Write Query?

Mar 24, 2011

SQL query:

I have a hierarchy structure like:

B reports to A
C reports to A
D reports to A
E reports to B
F reports to B

and so on......

So, when A logins he should be able to see B,C,D(who are reporting to A) and also E,F(who are actually reporting to B and not directly to A)Please help to write such sql query.

View 5 Replies

Write Xml Files From Ms Sql Server Table?

Jun 18, 2010

i"m using write.xml to write xml files from ms sql server table. the problem is that the information is not trimed... so i get lines like-

<data>1 </data>

are there is a way to trim the data even if i use write.xml mathod?

View 3 Replies

C# - Write The Client Ip And Computer Name On Server?

Jan 15, 2011

Is there any way to write the client IP and computer name on my server running ASP.NET?

View 4 Replies

SQL Server :: Write A Procedure For Paging?

Nov 12, 2010

[URL]

so i write a procedure using one table like above article and it is working fine for me.

but problem is i need write a procedure using 2 to 3 table.suppose i have 2 table
ORDER and ORDERDETAILS and i need record from both table so in that case, how can i write procedure using two table and paging it.

so how can i write a procedure and how can i count the record using 2 table.

2-secondly i want to do paging like asp.net forum site.

View 7 Replies

Verbatim - Why Write @ Before Sql Queries - Select Data From Database Then Write Query?

Oct 1, 2010

Suppose we want to select the data from the database then we write the query for that. Example:

SqlConnection con=new SqlConnection(Connetion name) string selectPkId = @"SELECT PK_ID FROM TABLE" SqlCommand cmd=new SqlCommand(selectPkId ,con);

So,my question is that why we basically use @ before the sql query.If I don't use @ before that then it again work fine (does not give any error), then what is need of using "@"?

View 1 Replies

C# - Enforce Transactions For Write Operations In SQL Server?

Nov 16, 2010

How do I ensure and enforce that all write operations to my MS SQL Server DB are transactions-based?

The reason I want to do this is that the DB contains financial account data and operations that fail halfway through some set of changes should not be able to mess up the database by mistake or by crashing.

The application is written in ASP.NET C#.

Edit:

There is a DAL but it does not (yet) require transactions for changes.We wrote the DAL ourselves. We did not use ORM.

I know how to perform one transaction from ASP.NET.

I want to ensure that all changes are made in transaction form so that if the application throws some exception in the middle, there will be no change to the database.

View 3 Replies

C# - Read Write Excel File On Server

Sep 23, 2010

I would like to know your libraries recommendations to read and write Excel applications on ASP .NET website. I have tried GemBox and NPOI, because they don't required Excel to be installed on the server, but they have some limitations on handling Excel files that are marked to read only.

View 6 Replies

How To Write Server Applications In Visual Basic

Mar 4, 2010

I am looking into writing a web-based vehicle tracking system. The framework I have in mind looks something like this:

Client application --- Database --- Database updater.

Client application: This would query the database for information and then display this information on a map.

Database: holds vehicle information such as speed, location, payload etc.

Database update: This application would need to continually check for information received from vehicles and then add that to the database.

I am confident that with my current skill set and some research and learning, I could write the client application and interface it to a database. However, I am at a loss as to how to write the database updater. Presumably, this would be an application running continually on the server, waiting for information to be received from vehicles and updating the database. Is this something I can do with ASP.NET and Visual Basic? Or would this require a different way of thinking than writing web pages? Any pointers to relevant technologies?

View 2 Replies

WCF / ASMX :: How To Write Aspx Webservice For Wss Server

Nov 17, 2010

I want to create the webservice which works on wss document libray. I can upload document in document library using aspx webservice.

View 1 Replies

How To Configure IIS Or The Web Server To Allow It To Read And Write Files

Aug 18, 2010

I'm trying to add functionality to a simple web service that will allow me to log information to an XML file on the hard drive where the application is located. When I employ the functionality in a Console version of the application, the data gets logged to:binx86Debug MySolution.MyProjectMessageLogTestMessagess.xml. However, when I try to write read from or write to the XML file in the ASP.NET application, I get a System.UnauthorizedAccessException with the message: Accees to the path 'MessageLog' is denied.I would like the log file to appear in the in folder of the application directory, so what settings in IIS or on the server itself would I need to change to allow my application to read from and write to that folder?

View 3 Replies

SQL Server :: How To Write A Query To Fetch Records

Mar 27, 2011

I have two tables and following are the structure of both the tables

Tbale 1
Field1 Field2 Field3
d1 01 26/03/2011
d2 02 26/03/2011
d3 03 27/03/2011

Table2
Field1 Field2 Field3
01 6.15 14.25
02 7.30 16.25
03 6.00 18.25

My expected output when i search records by table1.field3 (say 26/03/2011)

Tbale 1
Table1.Field1 Table2.Field2 Table3.Field3 Table2.field2 Table2.Field3
d1 01 26/03/2011 6.15 14.25
d2 02 26/03/2011 7.30 16.25
d3 03 27/03/2011

Inorder to get the above result, what query should i write?

View 4 Replies

SQL Server :: Page_Load Doesn't Write In The Database

Aug 17, 2010

i want to write a ASP.NET page, in this page the page should always write in a MSSQL Database when someone does a HTTP Request.

So i establish in the Application_Start Method the connection the database.

[Code]....

In the Application_BeginRequest Methode, i analyse the UserHostAddress of the Request:

[Code]....

With the debug mode, i know, that the app is executed. But sometimes the pages writes at every refresh the line in the database, but in most cases there is no entry in the database.

View 1 Replies

Web Forms :: Write A String To A File On A Server?

Apr 12, 2010

It is possible to upload a file to an account using the below code by specify an existing filepath.

What I wonder is how it instead would be possible to just write a string to this file instead. Like I want to open the file and write the string "Hello" to this file, file1.txt.

How can that be achieved. I beleive I would have to open up a stream of some kind but are not exactly sure how to set that up:

[Code]....

View 3 Replies

Write A Jpg File To Local Folder On Server?

Sep 22, 2010

in the application, I need write a jpg file to local folder on server, then show it in browser.

so, the code likes show this file:

HttpContext.Current.Request.Url.Host + "/View/ViewJpg.aspx"

In the ViewJpg.aspx, it will process the jpg. /view is in root folder.

it works fine when the code is on a server, however, I have problem when I debug in on local machine.

because the code is actually http://localhost/mYproject but HttpContext.Current.Request.Url.Host only returns http://localhost.

View 3 Replies

IE Fail To Server CSV File From Response.Write?

Nov 9, 2010

I've recently developed a web user control that lists a series of reports. When the user clicks on the report it serves back a CSV file download in the response stream using the following code:

Response.Clear();

Response.ContentType = "text/CSV";
Response.CacheControl = "no-cache"; [code].....

The code initially worked fine in all browsers. Then the client put a requirement to use SSL for the site. As part of this I introduced a global handler to update the protocol from HTTP to HTTPS for all requests as follows:

protected void Application_BeginRequest(Object sender, EventArgs e)
{
string requestURL = Request.Url.ToString().ToLower();[code]....

However, since securing the site using SSL the CSV file downloads no longer work for IE although they do continue to work for Firefox / Chrome / Safari.

Is there something I am missing in the headers that is unique to IE in order for the file response to work correctly?

The message I receive from IE is:

"Internet Explorer cannot download
Reports.aspx from .... in ......

Internet Explorer was unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."

UPDATE:

Here is some example fiddler output coming back from the page request which looks like it's serving correctly. Why doesn't IE understand that it's just been served a file?

HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:23:50 GMT
Server: Microsoft-IIS/6.0[code].....

View 3 Replies

SQL Server :: Write Sp-sql To Avoid Duplicate Values?

Dec 12, 2010

as i am new to ASP.NETi have a database for employee appraisal for a company. in that table

employeeid,
appraisalid(primary key),
objective,

[code]...

View 5 Replies

Web Forms :: Write In Chunks / Parameters Are Not Supported For The Write Method

Mar 29, 2011

I am reading in a file into a string. Then I am writing this string to a stream. I know this code works fine.

The only problem that I have is with the line that write the data in chunks where the parameters is not supported for the Write method.

The line that has the problem is this line. What do I need to change here?

OutPut.Write(buffer, 0, Math.Min(to_write, WRITE_CHUNK));

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved