Web Forms :: Publishing - Gridview Refuses To Work
Jun 24, 2010i have a web site that for some reason works perfectly when im running through visual studios, but the minute i publish it my one button in a gridview refuses to work.
View 18 Repliesi have a web site that for some reason works perfectly when im running through visual studios, but the minute i publish it my one button in a gridview refuses to work.
View 18 RepliesI developed and OpenID authentication system on C#, it worked perfectly on my LocalHost, but when I published it, I keep getting this error messages, what should I do?
Error:System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> DotNetOpenAuth.Messaging.ProtocolException: No OpenID endpoint found.
at DotNetOpenAuth.Messaging.ErrorUtilities.VerifyProtocol(Boolean condition, String message, Object[] args)
[code]...
I have published a website when is a plain page with login and CreateUserWizard control in it. I have used the "aspnet_regsql.exe" file to configure my database such that there I can see the tables like dbo.aspnet_users. I have also added a the following to the connectionstring in web.config
<connectionStrings>
<add name="ApplicationServices" connectionString="Data Source=***location of DB***; Initial Catalog=***DB Name***; User ID=***My ID***; Password='***My Password***';" providerName="System.Data.SqlClient" />
</connectionStrings>
I kept getting the "
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
" whenever I try to create user account using the CreateUserWizard control.
I am using web hosting account.
this is an extremely frustrating situation. We have just upgraded to Visual Studio 2010, and very nice it is, except for when it won't do something really simple, like Publish your ASP.NET Web Application to a folder on your desktop.For some unearthly reason, what used to work flawlessly in 2008 is now generating an error: It stops Publishing, after successfully Building, saying:Error: Copying file ImagesProfile32_32.JPG to objx64ReleasePackagePackageTmpImagesProlfile32_32.JPG failed. Could not find file 'ImagesCelebrityProfileImages32_32.JPG'.The problem is that there isn't any reference to that file in the project code (in the database, yes, but not in the code itself), and we don't want to store such images with the project (and they're not).Why (and how) has it suddenly decided that this unreferenced image (and presumably more if I get it to move past this one) is suddenly necessary to run the project? How can I stop this from happening?
View 1 RepliesI transferred my project into another computer from Win XP to Win 7. After installation, I realized that something in my App_code folder, called like mydata.web.utils namespace, has a class called like WebConstants (which is public class and public functions).
now in areas like global.asax, it tells me "WebConstants does not exist in this context"
Even though I have:
<%@ Import Namespace="mydata.web.utils" %>
And webconstants.cs has:
namespace mydata.web.utils
{
public class WebConstants
{
public static String APPLICATION_VERSION = "version";
........
}
}
No syntax errors or compiler errors in webconstants.cs
But everywhere else, it's saying "what is 'web'"??
If I rename the namespace from "web.utils" to just "web", still same problem. If I rename "web.utils" to "wez"--then the compiler errors go away.
But I cannot do this, because then I'd have to change it all over the project, which is a ton of work.
I also notice in the "build output" that there is no App_code being compiled in the project. Maybe because it's an ASP.net folder, I'm not certain. Is that normal?
How is it that the same source code, same visual studio, produces errors in win7 and no errors in the winXP computer?
I have been struggling to get WebMatrix to serve any cshtml files. I performed a fresh install of WebMatrix, then started a tutorial which involves creating one small cshtml file. Whenever I try to run the site, I get the following error:
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect. review the URL below and make sure that it is spelled correctly.
Requested URL: /Home.cshtml
I tried reinstalling to no avail.
I am running Windows 7 Pro, with IIS 7 installed. (IIS Express is supposed to be able to run side-by-side no problemo)
I am using Visual Studio 2010 and therefore have RDLC 2010 so developed couple of reports but when I run the project within developer machine and tries to export in Excel it works fine. But when I deploy my project on UAT machine (IIS) it simply refuses to export with the following error"The file you are trying to open 'myreport[1].xls' is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file."then it ask do u want to open anyway...when you select YES then it comes simply blank.
View 1 RepliesI am using Ajax ConfirmButtonExtender Control in GridView for Deleting the Record. I am also Exporting the GridData to Excel using Render Method. But when i click on the Export Button, i am getting below error Extender control 'confirmID' is not a registered extender control. Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDescriptors(). Parameter name: extenderControl
View 1 RepliesI have an ActiveX object which extends some functions. I have a web page that loads the ActiveX object and calls its methods in Javascript. The ActiveX object has two method; the problem is that Javascript can successfully call one of them but fails to call the other; citing Object doesn't support this property or method which is nonsense because I made a VB6.0 application that successfully calls this other method, so the two functions are indeed extended correctly and performing their job. And yes, the Internet Explorer security zones are all set and everything, as I wrote above the javascript code can call one method but refuses to call the other.
View 1 RepliesI'm trying to use a webservice that first expects the clients to login, to retrieve a cookie to re-use.
This is done through a login(string user, string pass) method on the webservice.
Doing this through a browser works fine, we get a cookie, and we can see the cookie via Fiddler or whatvever proxysniff thingy.
Time to do the same in ASP.Net, so we use the WSDL and generate a nice proxy class, and it works fine to call the login() method, but Never Ever does a cookie get set !
I already used the "cookiejar" technique - which means i create an instance of a CookieContainer and assign it to the proxyclass like this;
var cookies = new CookieContainer(3);
There I was, happily coding webpages, when suddenly it wouldn't run them anymore. Now when I click run I get an error message that looks like this: Server Error in '/' Application.This type of page is not served. Description:The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /quiz/intro.cshtml
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
How does nested gridview work? is it just gridview in other gridview?
View 1 RepliesI would like to create a gridview that gets data from a datasource but doesn't display it in the normal fashion based on my table layout.
Example:
Table layout is:
Name Emp# Dept# Booking Code# AccessId
This is how it looks in the gridview but I would like it to look like:
Name: John Doe Dept#: 12
Booking Code#: 1234 Booking Code#: 67
AccessId: 33
What data object will give this?Gridview won't work I think.
I have problem that just started showing up and I have no idea where it is coming from. I am making a website (ffctestsite.com) that uses the CSSFriendly.dll and .browser files to make a menu control look pretty. Unfortunately, it looks great when I preview the page from VS2010, but as soon as I publish it, the menu turns into a text menu and it doesn't render any of the ul's and li's that I expect to see. If you go to [URL] I've posted a picture of the code before and after publishing. I am using .net 3.5 because my host is slow at adopting new frameworks versions, but it worked until about a week ago. It just stopped working after that.
View 3 RepliesI've published my website and tried to host in my localsystem.Im getting the login page but cannot login to my application.When i click the submit button in the login page,the page simply refreshes and comesback.The page is not showing any error like 'invalid username or password' which i've set for not proper login
I am using visualstudio 2008 and iis 5.1.What could be cause of this error ??
How can i pulish my website online tell me the procedure ,steps?
View 1 RepliesMy page includes a button and a GridView bound to a LINQ data object which is bound to a table. when the page loads the gridview gets populated with the data and all work well. The button has an empty method, when I click the button I get en error message "Intenet explorer cannot display the web page" I put a break point at the begining of the method listed below but I get the error message before it gets there. If I remove the gridview than the button works well.
[Code]....
I have a gridview with several ItemTemplates. The first contains a checkbox the rest contain textboxes. I then added dynamically some bound controls like this:
BoundField bdfPrivName = new BoundField();
clsUtilities.SetBoundFieldCenter(ref bdfPrivName, "PrivName", "Priv Name");
BoundField bdfDescription = new BoundField();
clsUtilities.SetBoundFieldLeft(ref bdfDescription, "PrivDesc", "Description");
BoundField bdfLive = new BoundField();
clsUtilities.SetBoundFieldCenter(ref bdfLive, "Live","Active?");
grdExisting.Columns.Add(bdfPrivName);
grdExisting.Columns.Add(bdfDescription);
grdExisting.Columns.Add(bdfLive);
I then use FindControl to locate the checkbox and textboxes and perform my logic based the result
foreach (GridViewRow gvr in grdMissing.Rows) {
mckbAny = (CheckBox)gvr.FindControl("ckbAdd");
mtxtApplyDate = (TextBox)gvr.FindControl("txtAddApplyDate");
mtxtDateToAdd = (TextBox)gvr.FindControl("txtAddDateToAdd");
mtxtDateToRemove = (TextBox)gvr.FindControl("txtAddDateToRemove");
etc.
This all worked fine. I then got a request to put the bound fields as the second, third and fourth columns, after the check box and before the textboxes. I found that this was easy to do by changing the Add's to Inserts as follows:
grdExisting.Columns.Insert(1, bdfPrivName);
grdExisting.Columns.Insert(2, bdfDescription);
grdExisting.Columns.Insert(3, bdfLive);
It looked fine of the page, but the FindControls, all of them fail to work.
I'm using the code below to extract data from a gridview and populate it into textboxes for the days and two drop downs for Project and Category.
For some rows in the gridview everything but the category ddl populates correctly. If I click the row a second time the category ddl displays the correct category.
why I have to click twice for some rows? And how do I fix this?
[Code]....
I have a gridview in which I am using a button field where the button type is "Image". The purpose of this button is to delete a row.
This works good. But when I add a confirmation on "RowDataBound", it does not work.
Here is my gridview.
[Code]....
I would like to know if there is a way to debug the gridview and work around the code that is behind it.Right now i'm getting an error when i try to modify a record with this control. So, if any of you guys know a way to get this done,
View 6 Replies[Code]....
I have tryed this sorting code here in first post http://forums.asp.net/t/956540.aspx but it doesnt work. any tips?
I have a gridview connected to my objectdatasource, i wrote a class for the database queries.Now when i do an update of record i get the id form the grid, when i click on delete i don't get the id, its 0.Is there an option to set the id? i can't find it in the gridview.
View 9 Repliesi have been following the asp.net data access tutorials on this site. When i try to update, nothing happens. I believe the problem lies with my wrong coding on the BLL part. I'm using table adapters. Could anyone point out what iswrong with my code or tell my what the correct code is?
[Code]....
I want to call a javascript function at onload event of gridview..But I am getting Compilation error. How can I do this?
Basically I am using a javascript in .aspx page which have a master page. I want to get the value from javascript in code behind.