asp.net-3.5

Forcing ASP.Net to use TCP/IP to connect to SQL Server instead of named pipes

試著忘記壹切 提交于 2020-01-01 04:51:05
问题 How can I force my ASP.Net application to connect to a SQL Server using TCP/IP, not Named Pipes? I read somewhere putting "tcp:" in front of the server name in the connectionstring should do the trick, but it does not seem to change anything. Edit1: TCP/IP is enabled on the SQL Server. I tried Network Library=dbmssocn in the connectionstring, I still get an errormessage about named pipes: "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server" Edit2: Turns out

PDF Previewing and viewing

我怕爱的太早我们不能终老 提交于 2019-12-30 06:41:05
问题 I'm creating a document viewing web application. You log in and it takes you to a screen where you have all your docs listed on the left. I want to make it so that when you roll over a document a preview of the document shows up on the right. From there you can click on it for a full view and printing capabilities. I'm not asking how to do all that but I'm wondering what the best way would be to go about rendering the preview of the document. The documents are all going to be pdfs and stored

Publishing ASP.NET 3.5 Site Leaves Web.config Empty Due to providerOptions Element

橙三吉。 提交于 2019-12-29 09:37:52
问题 I am trying to publish a ASP.Net 3.5 site to an IIS 7.5 server using WebDAV and each time I do the config file winds up empty. The culprit is the providerOption elemet seen in the code below. <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5"/> <providerOption name="WarnAsError"

How do I convert a Bitmap to byte[]?

为君一笑 提交于 2019-12-29 08:27:11
问题 Basically I am inserting an image using the listviews inserting event, trying to resize an image from the fileupload control, and then save it in a SQL database using LINQ. I found some code to create a new bitmap of the content in the fileupload control, but this was to store it in a file on the server, from this source, but I need to save the bitmap back into the SQL database, which I think I need to convert back into a byte[] format. So how do I convert the bitmap to a byte[] format? If I

Error message: Cannot convert type 'string' to 'string[]'

余生长醉 提交于 2019-12-29 06:57:06
问题 I am creating a dynamic array, and getting an error: Error message: Cannot convert type 'string' to 'string[]' The code is: arrTeamMembers += tb.Text; tb.Text contains values such as "Michael | Steve | Thomas | Jeff | Susan | Helen |" I am trying to pass the values from tb.Text to arrTeamMembers. I am NOT trying to split the text. How can I resolve this error? 回答1: You can't just add strings to an array of strings. Depending on what you are actually trying to do, you might want this: string[]

Sharing session state between 2 ASP.NET applications using SQL Server

拜拜、爱过 提交于 2019-12-28 06:32:09
问题 I'm working on a site that has a requirement to share session between a cms application and an online store application on the same domain eg. mydomain.com and store.mydomain.com I've made some progress with it and it works on my local build between localhost/cms and localhost/store Basically I have done what is suggested in this article http://blogs.msdn.com/toddca/archive/2007/01/25/sharing-asp-net-session-state-across-applications.aspx and hacked the TempGetAppID Stored Procedure to return

How can I create a subdomain in asp.net?

隐身守侯 提交于 2019-12-25 04:37:10
问题 How can I create a subdomain in an asp.net C# application? I am working with an asp.net portal. In that portal I need to be able to create the subdomain at runtime. The ftp for that subdomain also needs to be the same as the main domain ftp. 回答1: There are a handful of working parts here. It sounds like the requirement is that this all happen at runtime. I am sure a lot of web hosting providers are deep into these sets of problems and likely have custom solutions. DNS : you'll need to have an

Which version of sos and clr/mscorwks.dll to load?

醉酒当歌 提交于 2019-12-24 23:58:13
问题 I have a 32-bit application (targeting .NET 3.5) hosted on a 64-bit machine. I want to analyze the memory dump of this 32-bit application. I captured the memory dump using 32-bit adplus and cdb. I am loading the memory dump into 32-bit windbg. When I load .net 2.0 sos.dll and .net 2.0 mscorwks.dll into windbg and execute !clrstack, I get the following error: "Failed to find runtime DLL (mscorwks.dll), 0x80004005 Extension commands need mscorwks.dll in order to have something to do." What am I

ASP.NET AJAX: How can I send information to the client from server-side

我们两清 提交于 2019-12-24 18:31:33
问题 The page has already run its' initialise/load sequences etc but then catches an event. How can I then send value(s) from this event to the client. That probably doesn't make much sense, hopefully this will clarify: I have a grid (Telerik RadGrid) in a user control (A) and when the user selects a row in that grid, I want to update another user control (B) with the selection. I have wired up an event so that user control B is notified of the newly selected value however setting say a textbox

Click event handler with Custom Control Button

▼魔方 西西 提交于 2019-12-24 14:30:41
问题 I'm creating an ASP.NET Custom Control for my web application which is basically an ASP.NET Button control contained inside multiple <div> elements (for styling purposes). How can I create a Click event handler for my custom control so that my control acts as an ASP.NET Button? Ie. <cc:Button id="myButton" runat="server" Text="Submit" /> Sub myButton_Click(sender as object, e as EventArgs) Handles myButton.Click End Sub 回答1: In the code behind, declare an event in your class: Public Event