|
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;
|
|
|
|
|
That code will close the connection if it succeeds. If any part of the code throws an exception, however, the connection will remain open.
Both the SqlConnection and SqlCommand classes implement the IDisposable interface. Whenever you create something that implements IDisposable , use it within a single method, and then throw it away, you should wrap it in a using block to ensure that the Dispose method is always called.
Also, since you're using a data adapter, you don't need to explicitly open and close the connection; the data adapter will take care of that for you.
using (SqlConnection con = new SqlConnection(GetConnectionString()))
using (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);
DataSet dataset = new DataSet();
da.Fill(dataset);
return dataset;
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks richard for your suggestion
|
|
|
|
|
Hi,
I want to use ajax tabcontainer in asp.net mvc 4.
I found out that the AJAX Control Toolkit controls are server controls and are not supported in ASP.NET MVC. But I want to use it. So please guide to me how can I use tabcontainer with other ways like ajax tabcontainer.
Thanks in advance , sir.
modified 14-Jul-14 7:11am.
|
|
|
|