|
Sorry and Thank You Sir,
I did search by google but didn't find out and try the right thing...
I think it may be complex to with Stored Procedure. Maybe I can only design a for loop to make SQL clause to make the data insert into the database one by one. That is my initially idea.
Thank you your suggestion again.
I well still to try in the right way.
|
|
|
|
|
It will not be complex in any way with Stored Procedure. You can use xml paramter in Stored proc and use that in your C# code to pass the parameter to stored proc. One thing is you need to create an xml doc with your C# code. If that is tough, create a simple datatable with required columns and rows, convert that to xml and then you can use that in your stored procedure. An example for this is:Stored Procedure takes Xml as input parameter. Or Try use with Linq queries. That will be so easy
Another Example : Pass XML as Parameter from C# to SQL Stored Procedure This example is for select, you can write insert statements instead.
Creating a loop and putting Sql statements inside that loop is much inefficient and less secure.
|
|
|
|
|
|
how to store text -box value in database
|
|
|
|
|
|
Hi All,
I am trying to write a application where i want to access a virtual directory and save those list of files in local drive.I am bit new to write such application .can anybody help me providing a code snippet for doing such things.
Thanks
Pulkit
|
|
|
|
|
Actually speaking, saving files in a virtual directory is a bad practice. If the file size becomes too large, it will affect the performance. It should be save some where in network folder. However, you can have a look at the following for saving files in virtual directory:
1) Example1
2) Example 2
|
|
|
|
|
Receiving requestTimeOut error on 200 concurrent users
|
|
|
|
|
Sounds like you need to increase capacity of your servers, implement clustering, improve the performance of your code, or any of the combination of options.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello , I am trying to make a custom login page .
On adding the password to AspNetUsers I get the following error :
Cannot insert explicit value for identity column in table 'AspNetUsers' when IDENTITY_INSERT is set to OFF.
Source Error:
Line 86:
Line 87: var user = new ApplicationUser() { UserName = model.UserName };
Line 88: var result = await UserManager.CreateAsync(user, model.Password);
Line 89: ApplicationUser appusr = new ApplicationUser();
Line 90: IdentityUserRole idnt = new IdentityUserRole();
Is there any way to solve this without changing the identity column .
The default field is Id nvarchar(128) .
|
|
|
|
|
Hi
I get below errors even after deleting the ASP.Net Temporary folder any suggestions please.
Warning 4 The type 'DacsOnlineWebParts.DacsOnlineControls.CountrySelector' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.15.cs' conflicts with the imported type 'DacsOnlineWebParts.DacsOnlineControls.CountrySelector' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.15.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.14.cs 161
Warning 5 The type 'DacsOnlineWebParts.DacsOnlineControls.MultiTextBox' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.5.cs' conflicts with the imported type 'DacsOnlineWebParts.DacsOnlineControls.MultiTextBox' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.5.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.4.cs 188
Warning 6 The type 'DacsOnlineWebParts.WebParts.DacsOnlineControls.Calendar' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.11.cs' conflicts with the imported type 'DacsOnlineWebParts.WebParts.DacsOnlineControls.Calendar' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.11.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.10.cs 167
Warning 7 Reference to type 'DacsOnline.Service.Service.Interfaces.ICountrySelectorService' claims it is defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\545a7eca\e566985d_9b9ecf01\DacsOnline.Service.DLL', but it could not be found
Warning 8 Reference to type 'DacsOnline.Service.Service.Interfaces.ICountrySelectorService' claims it is defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\545a7eca\e566985d_9b9ecf01\DacsOnline.Service.DLL', but it could not be found
Warning 10 The type 'DacsOnlineWebParts.DacsOnlineControls.CLProduct' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.0.cs' conflicts with the imported type 'DacsOnlineWebParts.DacsOnlineControls.CLProduct' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.0.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.0.cs 432
Warning 11 The type 'DacsOnlineWebParts.DacsOnlineControls.SalesInformation' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.2.cs' conflicts with the imported type 'DacsOnlineWebParts.DacsOnlineControls.SalesInformation' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.2.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_olio4mzp.2.cs 306
Error 12 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 323
Error 13 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 323
Error 14 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 496
Error 15 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 496
Error 16 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 519
Error 17 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 519
Error 18 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 572
Error 19 The type 'DacsOnlineWebParts.DacsOnlineControls.CLReproductions' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\App_Web_jgeqw53u.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dacs-website-master\ec1242e9\e12c789a\assembly\dl3\d5a669b8\f58d985d_9b9ecf01\DacsOnlineWebParts.DLL' D:\DACS-Website-master\DacsOnlineLocal\Backup\DacsOnlineControls\CLProduct.ascx.cs 572
|
|
|
|
|
hello friends,
Is it possible to run multiple websites on single port of iis?
|
|
|
|
|
Yes.
To host more than one Web site on a Web server, you can assign a unique IP address to each Web site, designate a non-standard TCP port number for a Web site, or use host headers. Of the three methods, it is more common to use host headers than to assign unique IP addresses to Web sites or to use non-standard TCP port numbers.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I want to know that can host 2 websites on localhost with same port numbers
|
|
|
|
|
Using host headers, you can have two websites on the same IP address and port number. For example, http://site1.local/ and http://site2.local/ can both share port 80 on the same IP address.
If you want both sites to be available as http://localhost/, then you'll have to create them as applications within a single site.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i have hosted two applications under one site and both are running perfectly on single port.
So that i raised this question. But, if i tried to created separately i doesn't supported.
excellent answer from you friend.
Thanx.
|
|
|
|
|
Hi Friend, Please Help me,
I have two dropdownlists and two nested GridViews. In first dropdwnlist continents and second countries. I want to bound two GridView into GridView. In first GridView i want to States and second GridView i want fill District. When i select continents in first dropdwnlist then second dropdwnlist fill that countries. When i select second dropdwnlist's countries, then how to fill nested GridView States and Districts. Can I do it in ASP.NET C#. Please Help me.
My E-Mail ID- bharat.garande@gmail.com
|
|
|
|
|
Yes you can bind the state gridview and district gridview on the RowDatabound event.
check the selected value of DropdownList 1 value and DropdownList 2 value and then find the child gridview and bind the datasource..
|
|
|
|
|
HI,
I am facing an issue , from my client side (HTTPS browser) I am trying to connect a HttpTaskAsyncHandler in the project
Eg:
var webSockets = new WebSocket("wss://xxx.com//Racer.HTML5/WSHandlerCall));
if (webSockets != null) {
webSockets.onopen = function () {
alert('Connection open');
}
1.The sockets send a request.
2. OnOpen Listener is triggered but not called the handler.
Plz Help !!
|
|
|
|
|
I don't know if this was just a typo when you posted, but you are missing the closing "
var webSockets = new WebSocket("wss://xxx.com//Racer.HTML5/WSHandlerCall));
should be
var webSockets = new WebSocket("wss://xxx.com//Racer.HTML5/WSHandlerCall");
|
|
|
|
|
[^]
Note sure if this helps:
"We can only use .NET WebSocket on Windows 8, Windows Server 2012 and above, including both server-side and client-side applications. And the web server must be IIS 8 and above. IIS 8 Express which is also packaged in Visual Studio 2012 does NOT support WebSocket at present. "
|
|
|
|
|
I have done performance testing for our web application for 500 concurrent users which results on 100% CPU Utilization on database server. Also the number of connections exceeds to 500-600 connections.
Because of this Performance testing got failed with 500 - Internal Server error.
Is there any way to reduce the number of connections for 1000+ concurrent users.
Please help on this.
|
|
|
|
|
First of all - 100% CPU usage tells nothing about performance. You have to measure response time, not hardware utilization...
You should check how many request failed with HTTP 500. It may not be connected to the DB connections, and anyway not all of them should fail even if DB is overloaded...
Try using connection pooling - http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx[^]
(We running web site with few thousand concurrent users and no DB problem)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Along with connection pooling, make sure in your application that you close your connection to the database as soon as you are done with it.
|
|
|
|
|
In webconfig, i have set pool size and connect timeout as 0.
Also am closing the connections once over.
Though am receiving sleeping connections as 150.
Using below code for connection
DataSet dataset = new DataSet();
SqlConnection con = new SqlConnection(GetConnectionString());
con.Open();
SqlCommand cmd = new SqlCommand(storedProc, con);
cmd.CommandTimeout = Convert.ToInt32(GetCommandTimeout());
cmd.Parameters.Add(new SqlParameter("@AssociateId", SqlDbType.Int)).Value = AssociateId;
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.CommandType = CommandType.StoredProcedure;
da.Fill(dataset);
con.Close();
return dataset;
|
|
|
|