Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Wednesday, March 28, 2012

PageMethods dont regenerate on file change?

If I define a new page method or change an existing page method I have to restart my dev asp.net server to see the change in the generated javascript (page prototype)? anyone else having this problem?

thanks

Hi,

Without any valuable information, it is hard to say where the problem lies on.

Please provide any more information,eg. any code of this.

Thanks!


Hi Craigw,

It seems like a cache issue rather than a IIS issue. So I suggest you to save your web.config file without any modifications and have a test. If it works, we can confirm it.

Also you can delete all the cache file or do the following steps. open the IE -->Tools-->Internet Options-->General Dialog-->Browswer History-->Settings-->select "Every time I visit the webpage".

I hope this help. If it doesn't work, please feel free to let me know with more information.

Best regards,

Jonathan


This problem has been quite annoying for some time. Can you please confirm if it has been identified and whether a fix will be available?

It happens on the server (Win 2003 R2) as well as on developer PCs (Cassini). Restarting the web server does the trick as well as re-saving web.config. It's quite easy to reproduce (and yes, I have enbaled PageMethods in the ScriptService tag...)

Monday, March 26, 2012

PageMethods is undefined when calling webservice from usercontrol

I have the following code to call a webservice in an aspx file. But the same code does not work in a usercontrol that I have created. I always get the message that 'PageMethods is undefined'. On the aspx page it generates the following:

<script type="text/javascript">
<!--
var PageMethods = { HelloWorld:function(s,onMethodComplete, onMethodTimeout, onMethodError) {return Web.Net.PageMethodRequest.callMethod("HelloWorld",{s:s}, onMethodComplete, onMethodTimeout, onMethodError); }
}
// -->
</script>

but in the usercontrol this variable is not generated. The following is the code in the aspx page which is very similar to the code in the user control. Please help!

<atlas:ScriptID="Script1"runat="server"Path="~/ScriptLibrary/AtlasCompat.js"Browser="Mozilla"/>

<atlas:ScriptID="Script2"runat="server"Path="~/ScriptLibrary/AtlasCompat.js"Browser="Firefox"/>

<atlas:ScriptID="Script3"runat="server"Path="~/ScriptLibrary/Atlas.js"/>

<scripttype="text/C#"runat="server">

[WebMethod]

publicstring HelloWorld(string s)

{

return"Hello '" + s +"'";

}

</script>

</head>

<body>

<formid="Form1"runat="server">

Enter your name:

<asp:TextBoxid="nameTextBox"runat="server"></asp:TextBox>

<buttonid="buttonGo"onclick="return OnbuttonGo_click()">GO</button>

</form>

<scripttype="text/javascript"language="JavaScript">

function OnbuttonGo_click()

{

//textbox string value passed as a param to the server method

PageMethods.HelloWorld(document.getElementById("nameTextBox").value, OnWebRequestComplete1);

returnfalse;

}

PageMethods are currently not supported inside user controls. I've open a bug to track that issue. Thanks.


If I put the WebMethod in the calling page I can call it from the usercontrol, which allows for the functionality that I desire. This is not as clean as I hoped for but it will work.

Thanks


Has this been fixed in the December release? It appears not, unless I am doing something incorrect. I am getting the js error 'Web' is undefined. Even my work around for this problem apears to be broken.

PageRequestManagerParserErrorException caused by Response diddling?

I am porting an old app that downloads a csv file by writing into Response.OutputStream when a button is pushed on the form. The button is contained in an asp:Panel that can be made visible or not, so the Panel needs to be contained in the UpdatePanel.

If the asp:Panel and button are in an update panel, I get PageRequestManagerParserErrorException. If the panel and button are NOT in an UpdatePanel, the download works okay, but of course, I lose the ability to show/hide the asp:Panel.

My question is--is there a way to have a button in an UpdatePanel, but tell it NOT to participate in partial page rendering?

Or is there a better way to do the download??

Thanks,

R.L.

Hi Rlparker,

If you want a button not to participate in partialrendering then you have to make sure that you the button as a postback trigger. This will make sure that the button will act normally as a normal button event. See:

http://ajax.asp.net/docs/mref/T_System_Web_UI_PostBackTrigger.aspx

Hope this helps.

Regards,


Sorry

"you have to make sure that you the button as a postback trigger"

you have to make sure that you define the button as a postback trigger

Regards,


Thanks!!

R.L.

Wednesday, March 21, 2012

Parser Error Message: Could not load file or assembly Microsoft.Web.Atlas or one of its de

hi all,

I have a not so nice error that I can't solve. I use asp .net 2.0 and Atlas. The site works in dev but not on my server...

I hope someone can help me out.

Regards
Stijn

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load file or assembly 'Microsoft.Web.Atlas' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1: <%@dotnet.itags.org. Page Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
Line 2: <%@dotnet.itags.org. Register Assembly="Microsoft.Web.Atlas" Namespace="Microsoft.Web.UI" TagPrefix="cc2" %>
Line 3: <%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>
Line 4:


Source File:/issue/default.aspx Line:2

Nobody? Do I need to give some additional info? This problem really holds up my development so please help meout here.


hello.

well, i guess that you must see if ASP.NET 2.0 is installed in IIS and if the vdir you've created there is configured to use it...


ASP .Net 2.0 is installed and the site also uses the 2.0 version. The error is about ATLAS so I think I have a configuration problem there? I use windows 2003 server.

Hello,

I have the same identically problem.

When I run my application on local web server don't have any problem, but when I transfer my aplication on remote server(Aruba) I have the problem:

Could not load file or assembly 'AtlasControlToolkit' or one of its dependencies. The system cannot find the file specified

Line 1:<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Erbario.aspx.cs" Inherits="_Default" %>Line 2: Line 3:<%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>Line 4:<%@. Register TagPrefix="test" Namespace="Test" %>Line 5:

Have you resolved the problem?

Help me please


MarcoLF:

I have the same identically problem.

Hi!

We are getting the same exception on our production server. Did you find out what causes it?

Thank you in advance.

Parser Error Message: Could not load file or assembly AjaxControlToolkit or one of its dep

Hi,

I am using ASP.Net 2.0 with AJAX Extensions 1.0. And one of my aspx was using 2 of the ajaxtoolkit namely the ModalPopupExtender and RoundedCornersExtender. But why is it that when I will access the page from the web server the error below will display on the page. It's really frustrating because there's no problem when running locally in my machine thru Visual Web Developer 2005 Express Edition.

I hope you could help me figuring the problem.

Thanks

Error message:

Server Error in '/' Application.

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1: <%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>Line 2: <%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>Line 3: Line 4: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File:/pfadmin/test.aspx Line:2

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

You need to deploy the AjaxControlTookit (DLL) to the server (in your bin directory or in the GAC).

-Damien


Hi hifiger2004,

You can just include the AjaxControlToolkit.dll into the BIN folder of your website/webapplication. There is no need to deploy it to the GAC. (Maybe you don't have the right to do that.)

Also check if some plain ajax functionallity works on the webserver!!! For example: A simple updatePanel holding a datetime.now, and a button to trigger it. Note that the ajax functionality must work in order to use the AjaxControl Toolkit.

Please let me know how it worked out!
Kind regards,
Wim


You have to include the AjaxControlToolkit.dll into the bin folder of your webapplication

Let me know if this helpful to you