Wednesday, March 28, 2012

Atlas, Firefox, and TinyMCE

I can't get TinyMCE to work with Firefox and Atlas.

Any changes made to the TextArea that tinyMCE is attached to are lost on postback. However, IE is fine, and removing the <atlas:ScriptManager> tag fixes it in Firefox too.

The following simple page fails:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">tinyMCE.init({mode : "textareas"});</script>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<asp:TextBox id="tb" runat="server" Rows="10" TextMode="multiLine" Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."></asp:TextBox>
<br />
<asp:Button ID="saveBtn" runat="server" Text="Postback" />
</form>
</body>
</html>
Has anyone successfully used tinyMCE and Firefox with Atlas enabled? Having said that, this 'Write a New Post' form looks very much like TinyMCE, and I'm using Firefox!?!
Any ideas?

Are people using other rich text editors successfully with Atlas?

Freetextbox?

FckEditor?


I've run into the same problem. Have you been able to figure this out? If so, what was your solution?

Thanks,
kevin


I had the same problem and solved it as follows:

- remove the ValidateRequest=false directive to avoid possible security issues

- add encoding : "xml"to the tinyMCE.Init code. This translates the HTML-code to XML and by doing this the secuity message won't appear.

- when filling the tinyMCE control with text, use TinyMCE.Text = Server.HtmlDecode(value); to translate it back into HTML

This worked out fine for me. I use the TinyMCE in a user control. The HTLM-translation is implemented in the Text property of the control.

Hopefully this helps.

Atlas, AJAX and InfoPath

I am working on the architecture of a new application based on Sharepoint Forms Libraries and InfoPath. There are several features of Atlas and AJAX that could be benificial in the contruction and interaction of these forms. So the promary question here is, Is there a way to use Atlas and AJAX in an Infopath form?

TIA

Infopath is a rich client, which basicly means that you can do a lot more in infopath than in a web browser. I'm not sure why would you want to use AJAX with infopath, and I highly doubt that you can use it in infopath.

Check out this website for more info on what you can do with infopath forms
http://www.infopathdev.com/


Also to add to that. Atlas can work on ASP.NET v1.1 (Which is what the current Sharepoint version runs on), however it is designed to work better with ASP.NET v2.0. Microsoft Office Sharepoint Server 2007 (MOSS 2007) will run off of ASP.NET v2.0. Also InfoPath won't just be a Client Application/Windows Application any longer... you will the ability to load the Forms created into a browser with most of the same features that would exist in InfoPath. However, MOSS 2007 and InfoPath 2007 won't be release till the end of this year and possible next year in coordination with Vista.

Good luck!

JoeWeb


Thank you for your prompt response. The reason for considering this scenario is primarily for the UpdatePanel and the Autofill objects. I was thinking that these could minimize network traffic. Also, thank you for the URL.

Harry


Thank you. I am anticipating on having SMS push .NET v2 to all of our client machines. The infopath forms will ba carrying v2 code behind and my thought was include AJAX for the data comunication for lists and lookups.

Just a thought.

Atlas XML Script

Is the Atlas XML Script syntax defined somewhere?
Thank you,
Jason Lind

Visit Nikhil Kotary's blogg for more info and downloads regarding Atlas:

http://www.nikhilk.net/Entry.aspx?id=92

Atlas x IIS

Dear frinds,

If I want to publish my site on a remote server (Windows 2003), this server nedd to have installed the Atlas Install?
Mu application has the atlas DLL in bin folder, but the server need the Atlas install?

It works for me with the Atlas dll in the bin without installing on the server.

Joe

Atlas works on Dev. Machine - not on IIS

hi,

I have installed Atlas - and just tried the simple example with the Labels and Time refreshing.

Works perfectly on the development machine, although it doesnt work once i publish it to the IIS server.

any ideas as to how to get it to work?

thank you.Depends on what the error is...

Atlas works on Dev machine but not on the production server

I get the following error when I try and run Atlas.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:The system cannot find the file specified. (E:\AtlasTest\web.config line 144)

Source Error:

Line 142: </httpHandlers>Line 143: <httpModules>Line 144: <add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>Line 145: <add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>Line 146: <add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>


Source File:E:\AtlasTest\web.config Line:144

All of the ATLS DLL's are in the bin directory and I have a couple of home grown components that work fine from the bin directory. The root is marked as an IIS application. The only thing I can think of, is the server is a Windows 2000 server NOT 2003 or XP.

.Net 2.0 runs OK - Will ATLAS run on a Windows 2000 server?

If so any other ideas why I can't get Atlas to run?

Twisted Rider,

That's quite an interesting error - the module concerned is stored inside the Microsoft.Web.Atlas.dll file, are you absolutly sure it's inside the Bin directory on the server?

How have you published the application? Have you used the publish functionality from within VS.NET 2005?

Kind regards,

Phil.


My pages work fine, if there are no atlas components on it, and when I start adding atlas components, it starts showing the following error: Please help, I have tried a lot and unable to solve the issue.

Security Exception

Description:The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details:System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] Microsoft.Web.Services.BridgeModule.OnBeginRequestHandler(Object source, EventArgs eventArgs) +0 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Looks like the server needs permission to use the System.NET namespace, I don't know much about this - anyone else got any ideas?

Solved this by overwritting web.config file with the following code:

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="InventoryTrackingConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\InventoryTracking.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<httpHandlers>
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>
<trust level="Full" originUrl=""/>
<compilation debug="true" strict="false" explicit="true">
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</buildProviders>
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
</system.web>
</configuration>


hello.

if i recall correctly, the problem is that bridges require full control. if you're not using bridges, then remove them from the web.config file an i think that you should be able to run in the "traditional" meddium trust level.


Can you please elaborate on how do we change the trust settings.

Plip:

Twisted Rider,

That's quite an interesting error - the module concerned is stored inside the Microsoft.Web.Atlas.dll file, are you absolutly sure it's inside the Bin directory on the server?

How have you published the application? Have you used the publish functionality from within VS.NET 2005?

Kind regards,

Phil.

Thanks for the response. The "Microsoft.Web.Atlas.dll" is in the "bin" directory, and I used VS2005 to publish the App. Any other ideas?


Found something interesting. I created a simple one button Atlas web page, worked great. But if any of the following assemblies(all seem to belong to MS office) are being used I get the error. The assemblies work fine without Atlas and Atlas works fine without the assemblies. Together they work on the development machine but fail on the server. There must be something wrong with the install/confiuration on the server, any ideas where to start looking?

<addassembly="office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

<addassembly="VSTOStorageWrapper.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.Office.Tools.Excel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.Office.Tools.Outlook, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

<addassembly="Microsoft.Office.Tools.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

<addassembly="Microsoft.Vbe.Interop, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

<addassembly="Microsoft.VisualStudio.OfficeTools.Controls.ManagedWrapper, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="Microsoft.Office.Interop.SmartTag, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

Server Error in '/' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Could not load file or assembly 'office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. (E:\OpRpts\web.config line 69) (E:\OpRpts\web.config line 110)

Source Error:

Line 108:</httpHandlers>Line 109:<httpModules>Line 110:<add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>Line 111:<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>Line 112:<add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>


Source File:E:\OpRpts\web.config Line:110


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


Figured part of it out. The office assemblies were not in the GAC. Added them to the bin directory as a test and the Atlas started loading ok. Still can't figure out why everything worked without Atlas, guess I'll just check it off to ghosts in the machine.

Just the same also here. Turned both options ON and it start working...In my experimenting it had a for a while a message about the security error, but it sure cannot be...

Atlas wont work on server

Hello.

I uploaded all my files in my atlas projekt to the server.

Now it won't work at all. everytime the atlas shoud change something instead of reload the page the page is reloaded.

On my local machine this is not any problem, and the atlas.dll file is in the bin filer so i do not think thats the problem.

Any Idea?

Thanks

Hi,

just a guess here but did you change the web.config to state that debug="false" on your server? If not try that option (you can change it in the web.config file). I read that the Atlas assembly regenerates other pointers to the resources for every request when in Debug mode.

Grz, Kris.


XIII:

Hi,


just a guess here but did you change the web.config to state that debug="false" on your server? If not try that option (you can change it in the web.config file). I read that the Atlas assembly regenerates other pointers to the resources for every request when in Debug mode.


Grz, Kris.

No that dident work ..

But thanks for the answer :D

Any other idea??

I think you have to install Atlas in the Server for it to work, not just the .dll


mrmercury:

I think you have to install Atlas in the Server for it to work, not just the .dll

Normally the deployment of the needed assembly to the /bin subfolder should suffice.

Grz, Kris.


hello guys.

besides adding the dll, you might also need to register the asbx extension used by brigdes. however, i think that this is not the problem you're having. have you configured your web site to use asp.net 2.0?


Luis Abreu:

hello guys.


besides adding the dll, you might also need to register the asbx extension used by brigdes. however, i think that this is not the problem you're having. have you configured your web site to use asp.net 2.0?


Yes my server have asp 2 and i have also installed atlas on the server.

The site is working exept atlas so its must be a config error i think.

Thanks for answering.
I'm having problems getting a simple Atlas Updatepanel on my server too.
I've got the Microsoft.Web.Atlas.dll in the ASP.NET Bin folder, copied the Web.config from a new website created using the Atlas template.

I've got a page with a dropdownlist and a gridview with a load of template fields (the gridview's SqlDataSource has a controlparameter for the dropdown's SelectedVale). I added a Scriptmanager and wrapped the gridview in an Updatepanel (and a contenttemplate). I added an UpdateProgress control and a trigger:

<Triggers>
<atlas:ControlValueTrigger ControlID="dropdownlist1" PropertyName="SelectedValue" />
</Triggers
(I also tried a ControlEventTrigger with "SelectedIndexChanged"). I've tried changing the list autopostback = false, debug=false in the web.config and checking that the legacy tag isn't in the webconfig

The page runs exactly the same as without the Scriptmanager and the UpdatePanel (except for a label I have outside of the Updatepanel is now only visible during updates, and the UpdateProgress control being visible during updates). It doesn't produce any errors, but it is still posting back. It's driving me nuts! Am I missing something obvious?Confused [*-)]

Any help much appreciated!
huum maybe I also have to publish my code :d

I did the Scott todolist and thats the one that do not work..

CODE:

Status:

Ferdige
Ikke gjort


Oppdaterer...



Innhold


/CODE

Sorry but some of the text is in norwegian..
Hello.

It works now.. I had to restart the server and then its up and running.

So thanks so much