Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 01, 2012 06:57 AM by Song-Tian - MSFT
Member
6 Points
5 Posts
Feb 27, 2012 03:00 PM|LINK
hi, i'm new to asp.net and currently working on a project writen in asp.net + c#
the program is working fine under vs2008 development server, but get an error when i deploy it to IIS7 in the same pc.
error message:
Message: Function expected Line: 191 Char: 1 Code: 0
so, i take a look at the source of the page, i found a "1" in the beginning of the line191 which is not expected...
but that part of code is auto-generated (right...?)
I'm not sure if that is related to ajax, i try this thread is just because the function after the "1" is related to ToolkitScriptManager...
please let me know if i get the question into a wrong thread.
any help are welcome.
Thanks in advance.
source:
189: <script type="text/javascript">
190: //<![CDATA[
191: 1(function() {var fn = function() {$get("ctl00_ToolkitScriptManager1_HiddenField").value = '';Sys.Application.remove_init(fn);};Sys.Application.add_init(fn);})();Sys.Application.initialize();
192: Sys.Application.add_init(function() {
193: $create(Sys.UI._Timer, {"enabled":true,"interval":3000,"uniqueID":"ctl00$ContentPlaceHolder1$TimerFindFile"}, null, null, $get("ctl00_ContentPlaceHolder1_TimerFindFile"));
194: });
195: //]]>
196: </script>
Participant
936 Points
375 Posts
Feb 27, 2012 03:05 PM|LINK
Hi,
When you say you deploy on IIS you do deploy like a webserver. If so you you will have to make sure that the folder you deploy in has .Net Framework 3.5 used.
Feb 27, 2012 03:19 PM|LINK
i build and publish the program
go to iis manager, add new application under the Default Web Site tag with the path of the published.
when i change the .net framework version from v2.0.50727 to v4.0.30319, it generate error when i browse the page...
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
and the other website in the iis also generate error when browsing (they were working fine before i change the .net ver)
i changed the application pool of the website to ASP.NET v4.0 and remove the webconfig stuff that caused the above error
same "function expected" error still coming up.
Thanks for the help anyway.
All-Star
65749 Points
11148 Posts
Feb 28, 2012 02:26 AM|LINK
Hi, Please refer this
http://forums.asp.net/t/1323093.aspx/1
43697 Points
4304 Posts
Microsoft
Mar 01, 2012 06:57 AM|LINK
stardust0083 when i change the .net framework version from v2.0.50727 to v4.0.30319, it generate error when i browse the page... HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
I guess you are using .net framework 3.5. If yes, please change to v3.0 in IIS. Any more question, please feel free to reply.
stardust0083
Member
6 Points
5 Posts
function expected error
Feb 27, 2012 03:00 PM|LINK
hi, i'm new to asp.net and currently working on a project writen in asp.net + c#
the program is working fine under vs2008 development server, but get an error when i deploy it to IIS7 in the same pc.
error message:
Message: Function expected Line: 191 Char: 1 Code: 0
so, i take a look at the source of the page, i found a "1" in the beginning of the line191 which is not expected...
but that part of code is auto-generated (right...?)
I'm not sure if that is related to ajax, i try this thread is just because the function after the "1" is related to ToolkitScriptManager...
please let me know if i get the question into a wrong thread.
any help are welcome.
Thanks in advance.
source:
189: <script type="text/javascript">
190: //<![CDATA[
191: 1(function() {var fn = function() {$get("ctl00_ToolkitScriptManager1_HiddenField").value = '';Sys.Application.remove_init(fn);};Sys.Application.add_init(fn);})();Sys.Application.initialize();
192: Sys.Application.add_init(function() {
193: $create(Sys.UI._Timer, {"enabled":true,"interval":3000,"uniqueID":"ctl00$ContentPlaceHolder1$TimerFindFile"}, null, null, $get("ctl00_ContentPlaceHolder1_TimerFindFile"));
194: });
195: //]]>
196: </script>
seamus1982
Participant
936 Points
375 Posts
Re: function expected error
Feb 27, 2012 03:05 PM|LINK
Hi,
When you say you deploy on IIS you do deploy like a webserver. If so you you will have to make sure that the folder you deploy in has .Net Framework 3.5 used.
stardust0083
Member
6 Points
5 Posts
Re: function expected error
Feb 27, 2012 03:19 PM|LINK
i build and publish the program
go to iis manager, add new application under the Default Web Site tag with the path of the published.
when i change the .net framework version from v2.0.50727 to v4.0.30319, it generate error when i browse the page...
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
and the other website in the iis also generate error when browsing (they were working fine before i change the .net ver)
i changed the application pool of the website to ASP.NET v4.0 and remove the webconfig stuff that caused the above error
same "function expected" error still coming up.
Thanks for the help anyway.
chetan.sarod...
All-Star
65749 Points
11148 Posts
Re: function expected error
Feb 28, 2012 02:26 AM|LINK
Hi, Please refer this
http://forums.asp.net/t/1323093.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Song-Tian - ...
All-Star
43697 Points
4304 Posts
Microsoft
Re: function expected error
Mar 01, 2012 06:57 AM|LINK
Hi,
I guess you are using .net framework 3.5. If yes, please change to v3.0 in IIS. Any more question, please feel free to reply.
Feedback to us
Develop and promote your apps in Windows Store