asp.net

How do I tell which account is trying to access an ASP.NET web service?

I'm getting a 401 (access denied) calling a method on an internal web service. I'm calling it from an ASP.NET page on our company intranet. I've checked all the configuration and it should be using integrated security with an account that has access to that service, but I'm trying to figure out how to confirm which account it's connectin...

Is this the only reason for using custom section types ( derived from ConfigurationSection )?

Hello, I've just started learning about extending the Configuration file structure by creating custom section types ( using ConfigurationSection class ), but I'm not sure I understand its usefulness. BTW – this is not a »custom section type vs appSettings« question. I already understand the benefits of using custom section types over...

Removing null/empty keys from a query string in asp.net MVC

Is there a way I can remove null or empty keys from a query string in asp.net MVC? For example I have a page where I filter data on a results table, if I search for John the query string would be redisplayed as: candidates?FirstName=John&LastName=&Credit=false&Previous=false&Education=&Progress= and not candidates?FirstName=John I ...

Send a email with a HTML file as body (C#)

Hello... How can I set the MailMessage´s body with a HTML file ? Thanks ...

TransactionScope: Has it gotten better?

When TransactionScope first came out, I ran into some serious issues getting it to work between my dev machine (XP) and our database server (Windows Server 2003). When I looked into it more, this appeared to be a tricky and widespread issue that had a chance of becoming a headache in production, so I decided not to handle transactions t...

Weird bug when running a regex-validator in IE7

Hi all I got a regex-validator on my asp.net page, which validates a password. The regex is ^(?=.*[0-9])(?=.*[a-zæøåA-ZÆØÅ])[a-zA-ZæøåÆØÅ0-9]{6,}$ .. Now, it works fine in IE8 and FF3, but it validates to false no matter what I try in IE7. Are there any knows bugs, I should know about here? :S Thanks in advance.. ...

How do I make a custom ASP.NET control based/subclassed on an existing one?

I want to make a custom ASP.NET control that is a subclasse of System.Web.UI.WebControls.Calendar. I need it to add a few data members and set up a few event handlers in it's constructor. Is this possible? If so How? So far I have tried using add new item to add a default web user control and tried editing in Calendar in a few differen...

ImageButton in UpdatePanel causes full postback in Firefox

I have an updatepanel that has an Image button: <asp:ImageButton ID="btnChangeMedium" OnClick="Change_Click" runat="server" /> When the page loads, based on some logic, I set the onclick attributes in the code behind. btnChangeMedium.Attributes.Add("onclick", "ChangeMedium();"); Works greate in IE. In FF, the imagebutton causes a p...

HTML Printing

I am too cheap to buy crystal reports so i built the report in asp.net, the only problem I'm facing is printing the report and making it look professional. On different printer's the report looks diff, i want to be able to control the final output and make the report print standard across all printers. You guys have any suggestions on ho...

jQuery(document).ready() load() aspx

I am using jQuery 1.3.1 and saying $('#somediv').load('somepage.aspx') An aspx that have a Repeater which loads few images. When loading is complete a cycle() function (jQuery plug-in) will be called upon them. Now I have this working on http://www.techlipse.net/test/agb via the function called from the menu-event-handlers (a combo box)...

Google Webmaster error: "We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header."

I have an asp.net website (SQL Server, Windows 2003, IIS 6) and I am using google.com/analytics/ to track visits. It all works fine. Now I would like to use Google Webmaster to get better information about my site but when I try to verify it by uploading a html file I get this error: "We've detected that your 404 (file not found) error...

Adding System.Web.Script reference in class library

I am currently moving code from my app_code folder to a class library. I have tagged several methods with [System.Web.Script.Serialization.ScriptIgnore] attributes. My class library cannot see this namespace. My add references dialog cannot see this namespace. How do I properly use this tag from a class library? The type or namespac...

How to set minOccurs to 1

I' building an ASP.NET web service. I've got my code defined as below, but I can't figure out how to the the wsdl to specify the minOccurs of the FirstName and LastName properties. I want those as required, and can not be empty. Is it possible? [WebMethod()] public void TestMethod(TestClass Test) { ... } [Serializable] public ...

Abort Asynchronous Web Service Call and redirect to another URL (ASP.NET Ajax)

In my webapp, I have a list of links generated from code-behind and bound to a repeater control. Clicking on a link opens a popup window, where, along with displaying some data, an asynchronous call to a WCF Service is made (through a javascript proxy). This service in turn calls another third party web service that might take a long tim...

Troubleshooting the built-in Visual Studio 2008 WebDev.WebServer.EXE

How do I begin to troubleshoot Visual Studio 2008's WebDev.WebServer.EXE? I'm trying to run the default ASP.NET MVC project. And I keep getting this message from Firefox: Unable to connect Firefox can't establish a connection to the server at 127.0.0.1:52589. * The site could be temporarily unavailable or too busy. Try again in a...

ASP.Net equivalent of PHP's file_get_contents ( 'php://input' );

Is there an equivalent method for this in ASP.Net? ...

accessing c# variable

ASP.NET, C#, Javascript I have an unknown number of results returning from an sql querey. I then make changes to their values with javascript and set a value on a hidden input (generated programatically on page_init). My question is: what's the best way to access the hidden input variables values in the C# code behind file. ...

jquery cycle IE7 transparent png problem

I'm having trouble getting jquery cycle to work when I have transparent png files in IE7 It's fine in Firefox and Chrome but in IE (version 7) I get a black colour where the png transparency is during the fade. Can this be made to work right? ...

Incorporating XSLT generated table into a webpage

I am currently updating a webpage that has some very simple data displayed in a 2xnumberOfEntries table. The original is hard-coded into html, which, as a programmer, I find to be annoying. I decided that converting the data to a simple XML schema would be the best idea since I really have no need for the added features of a database. ...

Hello need help with on how to do this in SQL Server News from Forum Topics/Messages

Okay I have three tables that all communicate with each other. ForumTopic t ForumMessage m ForumUser u What I am trying to do is get the first message of each Topic. I have tried this SELECT m.[Message], m.[TopicID], m.[Posted], u.Name, t.[Views], t.NumPosts, t.Topic FROM [ForumMessage] m INNER JOIN ( SELECT TopicID,...