asp.net-4.0

Can we use Razor on an existing ASP.NET 4 website?

岁酱吖の 提交于 2019-11-30 12:07:02
Is it possible to use Razor on an existing ASP.NET 4 website? You shouldn't even need to open the site in Web Matrix if you already have VS2010 and MVC 3 (which includes the Visual Studio tools for building ASP.NET Razor websites) installed. Installing MVC 3 makes the libraries required for developing Razor pages available, even to existing web applications. See: http://www.asp.net/webmatrix/tutorials/program-asp-net-web-pages-in-visual-studio You don't need to create a new Web Pages site (as per the instructions). You can just open up an existing web site, right click the site's root folder,

ASP.NET 4.0 Rendering problems with the menu control after removing of controlRenderingCompatibilityVersion=“3.5”

被刻印的时光 ゝ 提交于 2019-11-30 11:54:13
问题 I am actually migrating websites to ASP.NET 4.0, having problems with the new rendering of menu controls. My websites make heavy use of nested menus. Hover effects are used and the layout is defined by a combination of themes and skins with linked CSS. If I remove the pages controlRenderingCompatibilityVersion attribute, they are no longer rendered as nested tables, but as ul/li Tags. This breaks my layout in many ways. Any recommendations for a migration of a complex ASP.NET menu layout are

Asp.net checkbox and html data attribute

£可爱£侵袭症+ 提交于 2019-11-30 11:10:28
In asp.net, if you use a custom attribute, usually it is rendered as-is. Considering this markup ( note: attributes such as id , name and for were removed in all examples as their generated id/names are verbose): <asp:TextBox runat="server" data-foo="bar" /> Is rendered in asp.net as: <input type="text" data-foo="bar" /> That is, asp.net keeps data-foo untouched. Check box are usually rendered like this: <asp:CheckBox runat="server" Text="Normal" /> Renders as: <input type="checkbox" /> <label>Normal</label> But if you add a custom attribute on a checkbox: <asp:CheckBox runat="server" Text=

ASP.NET 2.0 to 4.0

非 Y 不嫁゛ 提交于 2019-11-30 10:28:43
I have a site in ASP.NET 2.0. I plan to move to 4.0. Is there any thing in particular I need to take care of or I just select the 4.0 framework and recompile and VS 2010 will update the web.config to reflect the changes? Aristos There are some few thinks that you must take care of. Read all the changes and have it near you on tests: http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes The validation mode has change: Can I deploy .net 4.0 web application on IIS6? The default.aspx has change when you try to get the url : Default.aspx with IIS 6.0 and .Net 4? one thing you need to do

Default.aspx with IIS 6.0 and .Net 4?

非 Y 不嫁゛ 提交于 2019-11-30 09:47:05
We have deployed a .net 4 asp.net site on IIS 6.0. Default.aspx is configured as one of the default document. When we access the site using the following url http://testsite We expect it to render http://testsite/Default.aspx But instead we get 404 Not found error . We did not had this issue when it was deployed on .Net 2.0. Only thing that has changed on the server is that we use .NET 4 instead of .NET 2.0. UPDATE : I tried the following link but it did not work. Getting an ASP.NET 4 application to work on IIS6 The framework version on the server is .NET 4 RC. Will it help if we install the

Options for real-time web notifications and updates using Comet/XMPP vs WebSocket technologies on a Microsoft stack?

假如想象 提交于 2019-11-30 08:58:42
I am scoping out the architectural options for a project that will render live updates (like Facebook) of user activities - logins, photos, etc. Two main UI components of this are an auto-updating scrolling area where new notifications will be listed (photos, etc.), and a toolbar that will update with things like updated message counts, etc. The contenders for this are Jabber/Comet/XMPP-based and WebSocket technologies. Comet camp: Pokein WebSync WebSockets camp: Kaazing LightStreamer SuperWebSocket XSockets SignalR Since this the existing infrastructure is a Microsoft stack, I would rather

ASP.NET MVC - Uploading an image to Amazon S3

孤街醉人 提交于 2019-11-30 06:56:08
I have my image from Request.Files[0]. Now, how do I upload this image to S3? I see that in the AWS .NET API you have to specify ContentBody when putting an object which is a string. How would I get the content body of my file? var file = Request.Files[0]; PutObjectRequest request = new PutObjectRequest(); request.BucketName = "mybucket" request.ContentType = contentType; request.Key = key; request.InputStream = file.InputStream; s3Client.PutObject(request); Slightly more detail with how to use folders and to grant all users read-only access. Html: C# HttpPostedFileBase file = Request.Files[0]

ASP.Net Post timeout

不打扰是莪最后的温柔 提交于 2019-11-30 05:58:33
问题 I am stuck with asp.net post issue with last 2 weeks. Scenario: My application page has 3 controls. A WYSIWYG editor (Free Textbox), a text box to get name of the article being edited in WYSIWYG editor, another text box to accept key words. Order of the controls in page from top to bottom as follows, first, Name text box second, WYSIWYG Editor last, Key Word text box Problem: When ever users tries to save their edited documents, IIS server returns time out (Production runs on win 2008). But

The best browser detection solution in ASP.NET 4.0

淺唱寂寞╮ 提交于 2019-11-30 04:46:00
I googled this topic and I came across with three different ways to configure browser capabilities: browscap.ini, browserCaps element in web.config and .browser files in App_Browsers. I thought .browser files is the latest way, but I don't seem to find up-to-date files. But I found quite fresh browscap.ini from http://browsers.garykeith.com/downloads.asp . My first priority is to exclude common crawlers from the visitor stats. The second priority is to detect browser and os with correct versions (e.g. Opera 11 / Win7). Are there any libraries I could use? Is browscap.ini still a valid way and

ServiceStack with IIS 7.5

流过昼夜 提交于 2019-11-30 03:17:55
问题 I installed Clean Windows Web Server 2008 R2 64-bit with IIS 7.5. I created .NET v4.0 application pool and Web Site in this pool, where I deployed my application with ServiceStack services. I got this error message in web browser when I opened servicestack page.: HTTP Error 500.21 - Internal Server Error Handler "ServiceStack.Factory" has a bad module "ManagedPipelineHandler" in its module list. My application is working in Visual studio hosted IIS server. Can be problem with IIS 7.5