I heard that a project was throwing this error on attempts to run it in a browser via Visual Studio. The full error complained about integrated Windows authentication.
What you need to do is go to the project via IIS and being up its properties. Then click over to the Directory Security tab, and under the first section, Anonymous access and authentication, there is an edit button. Click it, then down at the bottom you will see the checkbox for integrated Windows authentication. Check that box! Hit OK! And you should be all set.
Source: http://ryanfarley.com/blog/archive/2005/08/23/8540.aspx
Friday, February 19, 2010
Thursday, February 18, 2010
chart tools
don't know if you guys were aware of this, but the 3.5 framework supports a new set of charting controls - yeah, bar graphs and stuff1 How exciting! You'd need to install 2 separate add-ons, one for the framework, one for Visual Studio 2008, and then you can roll. I'm working on a bar graph now for a project.
Microsoft has a Getting Started article for these controls, but 4VGuysfromrolla's is much better and in depth, walking you through different ways to display your data, from hard coding the values, to progrommatically, to binding directly to a datasource. Read their article series.
ADDENDUM: I also highly recommend downloading the ASP.NET samples which you can run through Visual Studio 2008 (once you've downloaded and installed both add-ond mentioned above.) Highly interactive samples abound.
Microsoft has a Getting Started article for these controls, but 4VGuysfromrolla's is much better and in depth, walking you through different ways to display your data, from hard coding the values, to progrommatically, to binding directly to a datasource. Read their article series.
ADDENDUM: I also highly recommend downloading the ASP.NET samples which you can run through Visual Studio 2008 (once you've downloaded and installed both add-ond mentioned above.) Highly interactive samples abound.
Labels:
ASP.NET 3.5,
charting controls,
reporting,
Visual Studio 2008
Wednesday, November 4, 2009
Publish Failed - No Errors?
Hi All
I have run a across this a few times in the past and it drove me crazy:
Ever Build – The build succeeds, then when you Publish, you get “Publish Failed” but you don’t see any errors as to why? (it happens so few and far between – usually it’s a missing file / dll)
I found this on the web…
http://forums.asp.net/p/1248620/2478095.aspx
Try opening your Output Window in VS2005 or 2008 THEN publishing. It will display the errors that are stopping you from Publishing.
GMWEBDEV was full and VS2005 was unable to publish to it but I was not seeing that error in the Error List – It was only displayed in the Output Window.
Wednesday, September 2, 2009
Hi all,
I found something useful for a change and thought I'd share. :) While trying to check the accuracy of a specific origin path of a file to be uploaded to a destination directory from a web page I found that some newer browsers handle this a bit differently. For example, if the user browses to the file C:\Docs\myfile.doc on their machine from a web page, from an input box with type "file", the .value property of the input box in the C# code will return C:\fakepath\myfile.doc in IE8 and some other newer browsers. This MSDN article tells you how to get around that, only it is up to the user to do so by manually changing a security setting in IE8.
Since I can control the browser type and settings of the users for this project it's no big deal. But unless someone can find a way to read the entire file path in IE8, all you can call is the file name via the code. I'm sure this isn't going to be a common occurance, but I thought it was worth noting.
Another example:
I have this code...
if (File1.Value != @"C:\KneeOA\Back_End\KneeOA_Back_End.mdb")
...which is checking the path of the file to be uploaded because it has to be very specific for this project. IE8 only returns "KneeOA_Back_End.mdb" for "File1.Value" which is not really helpful. IE7 and earlier do return the whole path and therefore can check it for accuracy without having to change an IE security setting.
I found something useful for a change and thought I'd share. :) While trying to check the accuracy of a specific origin path of a file to be uploaded to a destination directory from a web page I found that some newer browsers handle this a bit differently. For example, if the user browses to the file C:\Docs\myfile.doc on their machine from a web page, from an input box with type "file", the .value property of the input box in the C# code will return C:\fakepath\myfile.doc in IE8 and some other newer browsers. This MSDN article tells you how to get around that, only it is up to the user to do so by manually changing a security setting in IE8.
Since I can control the browser type and settings of the users for this project it's no big deal. But unless someone can find a way to read the entire file path in IE8, all you can call is the file name via the code. I'm sure this isn't going to be a common occurance, but I thought it was worth noting.
Another example:
I have this code...
if (File1.Value != @"C:\KneeOA\Back_End\KneeOA_Back_End.mdb")
...which is checking the path of the file to be uploaded because it has to be very specific for this project. IE8 only returns "KneeOA_Back_End.mdb" for "File1.Value" which is not really helpful. IE7 and earlier do return the whole path and therefore can check it for accuracy without having to change an IE security setting.
Thursday, August 20, 2009
Page_LoadComplete
I have a page with a user control that has a dropdownlist for date. When the user control loads for the first time, I populate the year options using one of our toolbox methods. When the webform (the user control's host) loads for the first time, I also look in a database to see if there is a date stored that I should use to populate the date field. However, this latter thing was failing on the year field. Eventually I determined it is because the code to load the date from a database was running before the year field had any options - before the user control was fully loaded in other words.
I found these 2 articles that discuss the order of the page lifecycle, and list the lifecycle events:
ASP.NET Page Life Cycle Overview
Page Events in ASP.Net 2.0
I decided to use the LoadComplete() event, which also lets you test for PostBack, which I needed since I only wanted the databinding for the date to happen on first page load.
Just thought I'd mention this in case anyone else ever runs into a similar issue, and also to see whether anyone thinks a different event would have been better to hook into, like maybe Pag_PreRender.
I found these 2 articles that discuss the order of the page lifecycle, and list the lifecycle events:
ASP.NET Page Life Cycle Overview
Page Events in ASP.Net 2.0
I decided to use the LoadComplete() event, which also lets you test for PostBack, which I needed since I only wanted the databinding for the date to happen on first page load.
Just thought I'd mention this in case anyone else ever runs into a similar issue, and also to see whether anyone thinks a different event would have been better to hook into, like maybe Pag_PreRender.
Tuesday, August 18, 2009
Ever to find the table where a column is hiding in a giant DB?
I've been doing alot of this lately, being new to the CTSI db and such.
use this syntax, where 'yourcol' is the known column:
Select table_name from information_Schema.columns where column_name='yourCol'
or you can do a "like", like this:
Select table_name from information_Schema.columns where column_name like '%yourCol%'
use this syntax, where 'yourcol' is the known column:
Select table_name from information_Schema.columns where column_name='yourCol'
or you can do a "like", like this:
Select table_name from information_Schema.columns where column_name like '%yourCol%'
Monday, August 17, 2009
accessing a control in a repeater's headertemplate or footertemplate
If you are trying to FindControl on the repeater's ItemDataBound or ItemCreated event it's pretty easy. However I needed to access a control from the repeater's PreRender event. This is when I discovered that "Only items bound to the data source are contained in the Items collection. The header, footer, and separator are not included in the collection." (from MSDN).
Therefore I had to use a line like this which apparently works because "all child controls must exist inside the Controls collection" ("In Search of ASP.NET Controls", from odetocode.com)
Therefore I had to use a line like this which apparently works because "all child controls must exist inside the Controls collection" ("In Search of ASP.NET Controls", from odetocode.com)
HtmlTableRow tr = (HtmlTableRow)rptIncomplForms.Controls[0].Controls[0].FindControl("trFoot");
Labels:
findcontrol,
footertemplate,
headertemplate,
prerender,
repeater
Subscribe to:
Posts (Atom)