asp.net

No web service found at ... Random exception issue

Hi, in production env I randomly, several times per day, recieve following error: Exception type:InvalidOperationException Exception details: Source: System.Web.Extensions Message: No web service found at: path/servicename.asmx. I log it in Application_Error method. It happens when url request is : https://path/servicename.asmx/js ...

Event in User Control

I have a problem with button event in web user control First i have an aspx like this: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddTest.aspx.cs" Inherits="AddTest" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3...

Server-side code is not working in ASP.NET

i am added one button on user control it is working fine locally but not working on server my error is CS1061: 'ASP.templates_categories_productsingrid_ascx' does not contain a definition for 'dl_viewall' and no extension method 'dl_viewall' accepting a first argument of type 'ASP.templates_categories_productsingrid_ascx' could be f...

Html.DisplayFor DropDownList problem

Im using asp.net mvc 2. I have a model Supermodel that consists of 2 models TestModel1 and TestModel2. In SuperModelView Im doing the following thing: <%: Html.DisplayFor(x=> x.TestModel1, "TestModel1Template") %> Its working just fine, except for the fact, that dropdownlist is populated but selected value is not set. Im using the fo...

What are the necessary and most important things, we should do at validation, if an web application gets the users input or parameters?

I am always thinking about validation in any kind on the webpage (PHP or ASP, it doesn't matter), but never find a good and accurate answer. For example, a I have some GET-Parameter, which defines a SQL query like DESC oder ASC. (SQL-Injection?) Or I have a comment-function for user, where the data is also saved in a database. Is it e...

[Padding oracle]Example of asp.net application vulnerable ?

Hi all, Does anyone could put me a very basic example of an asp.net web application which is vulnerable to the padding oracle attack. Thanks a lot ! ...

Deployment question regarding App_GlobalResources.compiled

Hi all: For ASP.NET Web Site, when I modifiy resouce files, is it necessary to deploy the new App_GlobalResources.compiled along with App_GlobalResources.dll to the server? Thanks. ...

How can I find the users windows login username from ASP.Net?

I have an ASP.Net web application running on an IIS server, and I need to find the visitors login username. How can I can find this? When testing locally it found my username using new WindowsPrincipal(WindowsIdentity.GetCurrent());, but it finds NETWORK SERVICE when running the app on the server. ...

how to upgrade code to a new version of third party control

Hi Guys, I have a web application in asp.net 3.5 where i have been using some third party controls i.e. Devexpresv9.2 and on the pages where i am using these controls i normally has to call the register tag on the page markup like for ex: <%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d...

ASP.NET: Suddenly the name 'form1' does not exist in the current context?

This has been working for the past three weeks that I've been developing this application, and for some reason has decided to stop working five minutes ago despite my apparently not doing anything. In Default.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AppName.Default" %> <!DOCTYPE html P...

Calculating Timespan using asp.net

Hi I would like to use asp.net c# to calculate the timespan for when a file was uploaded. Example, if i uploaded a file two weeks ago my text will say 'uploaded 2 weeks ago' or if i have upload a file 4 month's ago my text will say 'uploaded 4 months ago' Can anyone please give me some tips on how i can go about this. Thanks ...

On the fly zip or tar creation?

I may NOT bother with this but if its very simple i may consider it. The site i am working on by design is to hold hundreds of thousands of files. I dont know if we'll have only one download or multiple. Right now the choices are A) Just the file B) An archive that has the file + license and conditions. I am trying to figure out it can ...

Is possible to run some Unit Tests as smoke tests from an .aspx?

In my project we use UnitTests (MsTest). We run them manually and in the build script. But for some environments where we deploy manually. We are in the need of having some smoke tests. At the moment I made this smoke tests "manually" (Login, create an user, create a licence, create a product, etc). I know I can run unit tests from co...

Message box on server side in asp.net

hey everyone, i have button click handler event in which i am using if-else condition.How can i show a message if it runs to else statement? Like please fill the requirements!!. ...

add css or color to item when selected from datalist

I had datalist and My manger told me when user select item in datalist this item must have css or color .I did my code but it didnot work well and this error apeared ( Operator == cannot be applied to operands of type System.Web.UI.WebControls.ListItemType and System.Web.UI.WebControls.DataControlRowType ) protected void DataList3_ItemD...

Asp.net MVC Html.Renderpartial Problem

Well I have this page < %@ .............. Inherits="System.Web.Mvc.ViewPage < Something.Models.SomeModel >" %> < % Html.RenderPartial("SomeControl",Model);% > and this user control page < %@ Control Language="C#" Inherits="System.Web.Mvc.ViewPage < Something.Models.SomeModel>"%> < p>< %: Html.TextBox("text",Model.Name) %>< /p> an...

How to get user details in asp.net Windows Authentication.

I am using windows Authentication and accessing user name as. IIdentity winId = HttpContext.Current.User.Identity; string name = winId.Name; but i want to get other details like User full name and EmailID. ...

WCF Service configuration in Web Farm and Load Balancing envrionment.

I want to configure ASP.NET Website Project using WCF Service[NetTcp] (both in c#) for web-farm (for website) and NLB Load balancing (for service). I would like to configure following options for same. NetTcpBinding.maxConcurrentCalls, NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections Note: During single machine configurati...

how do i get http header values from a post request.

Hi Guys, See what I'm trynig to do is on a post request made collect the http headers and then add them to app.Request.Headers.Add(). In my application basically another post request overides certain post requests that I make. On each request to my server there is a redirection to another server which adds some headers over my origina...

Overriding the default 'No Data' Message in MVCContrib Grid

Is it possible to override the default 'There is no Data available' message in MVCContrib Grid with a custom message? ...