POST
|
Hi Don, Sleepy services have been around for a while. 😉 I have used the VBA script to wake up the services (9.3 and 9.3.1). It is running every 15 minutes (services are idle in 20 minutes in my case). This has bee working pretty well for me. Here is the script: http://forums.esri.com/Thread.asp?c=158&f=2276&t=228654&mc=160#812067 I have recently installed ArcGIS Server 10 on Windows Server 2008, and Map Services don't crash the firts time they are accessed, but there is a pretty good delay. I decided to experiment and use a different approach (not sure where I got the idea from): instead of using a script to ping the services and keep them alive, I have set the Idle Timeout property of the ArcGISServicesAppPool to 240 (4 hours), instead 20 minutes. You can use your own timeout depending how often the services are used. The ArcGISServicesAppPool is the Application Pool that is used to run the /ArcGIS/KML, ArcGIS/rest, ArcGIS/Services... apps. This seems to be working. I no longer have delays when a service has not been used for 20 minutes. Here is the link how to set the timeout: http://technet.microsoft.com/en-us/library/cc771956(WS.10).aspx - IIS 7 http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/83b35271-c93c-49f4-b923-7fdca6fae1cf.mspx?mfr=true - IIS 6 It has a gottcha though: by keeping the worker processes alive you are not releasing server resources. I would say, try it, see if it works for you, and if it works, evaluate how this will affect the server, and if you can afford it. Good Luck! 🙂
... View more
03-16-2011
01:11 PM
|
0
|
0
|
191
|
POST
|
Use square brackets: ArcGISDynamicMapServiceLayer layer = MyMap.Layers["TitleVI"] as ArcGISDynamicMapServiceLayer;
... View more
03-04-2011
06:42 AM
|
0
|
0
|
286
|
POST
|
Hi David, I guess, I never took the time to revisit the thead you referred to. Guilty! I am attaching a solution file, with a very simplified Export to excel, using the FeatureDataGrid sample from the Gallery. It covers exporting all the features in the grid (FeatureLayer), the selected graphics, and exporting all the graphics but only a few of the attributes with their aliases. Please, don't be confused by the name of the solution, I just used an old project to test the export to Excel. Please, fix the ESRI assembly references. I had to remove them from the bin, because the zip was too big. There is a line of code in App.xaml.cs, which you should include in your project if you don't want your app to crash if user tries to save over an open Excel file. And you can find your own solution for this, if you don't like mine (I don't like it either, but I am solving problems one by one, so some have to wait. 🙂 ) Good luck! Let me know if something is not working for you. Hope, we will be able to resolve it. Darina
... View more
02-28-2011
06:20 AM
|
0
|
0
|
626
|
POST
|
Sara, You can try setting the IsHitTestVisible property of the GraphicsLayer containing the highlighted boundary to False. <esri:GraphicsLayer ID="boundaryGraphicsLayer" IsHitTestVisible="False" />
... View more
01-07-2011
08:39 AM
|
0
|
0
|
226
|
POST
|
I have just updated an application to 2.1, and noticed that popup window that shows on MouseEnter event of the GraphicsLayer does not appear when FlareClusterer is used and the user hovers over a cluster/node (the event doesn't fire on either). But the MouseLeave event fires when the cursor leaves a node. No problems when clusterer is not used. Does anyone have experienced the same behavior? How did you resolve it? In version 2.0, the event fires when the cursor goes over the cluster and over the nodes. Thank you!
... View more
01-06-2011
01:01 PM
|
0
|
1
|
550
|
POST
|
Paul, Go to the REST services directory, navigate to the service and then to the layer in question, and see if the Shape field is in there. Maybe the Shape field was not selected in the .mxd file and that's why you can get geometry back, and run spatial queries. If it is, try running a query in there to see what results you will get. If it is not in there, open the .mxd file, open the properties of the event layer, go to the Fields tab, and check the shape field. Save the document, restart the service, clear the REST cache, and try again. Good Luck!
... View more
12-14-2010
08:53 AM
|
0
|
0
|
796
|
POST
|
I have actually used both FrostedTabs and the Glass template, and after a little bit of troubleshooting they worked fine in both VS and Expression Blend. It has been a while, and I forgot what I did, but here is a link to a thread that might help you resolve some of the problems that you have: http://forums.arcgis.com/threads/11131-Using-Templates-from-the-Template-Gallery?highlight=frosted+tabs Good Luck!
... View more
12-14-2010
08:46 AM
|
0
|
0
|
966
|
POST
|
Hi Demin, I have encountered the same behavior of time-aware GraphicsLayer. 1. Clusters don't change when the value of the time slider changes: To resolve this problem, I am manually removing/adding the graphics from/to the GraphicsLayer that are not within the Curent Slider Value TimeExtent. To accomplish this I am performing a loop during the ValueChanged event handler of the TimeSlider. Be aware, the OldValue and NewValue of the TimeSlider.ValueChangedEventArgs are reversed. Kind of cumbursome, but it works. There is the option to use LINQ to SQL to filter the Graphics by the TimeExtent, and assign the result to the Graphics of the GraphicsLayer, but I didn't like the jumping of the graphics on the screen when the new GraphicCollection is assigned. It defeats the purpose of using a time slider to smoothly remove/add graphics. 2. When the count of the graphics is 0, the clusters don't clear: Same behavior on the GraphicsLayer, and I found out that graphicsLayer.Refresh() fixes the problem. So, you might try to call Refresh during the featureLayer_UpdateCompleted if the count of the graphics is 0. If you decide to go the way of manually removing/adding graphics, let me know, and I will post the code. Hope, this will be resolved soon. Good Luck!
... View more
11-16-2010
12:15 PM
|
0
|
0
|
308
|
POST
|
Luis, You don't mention anything about proxy page. If you haven't set up one here is some info what you need to do: http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/help/?Secure_services.htm Good Luck!
... View more
11-08-2010
11:43 AM
|
0
|
0
|
248
|
POST
|
Hi Scott, I have just deployed yesterday a .Net Framework 4 application on IIS 6. I did all the steps you did (I had to install .Net Framework 4 too), and after all this I got 404 error. I resolved this by allowing the ASP.Net 4 Web Extension (it was prohibited after the installation) on the web server. I know your error is different, but check if ASP.Net 4 is allowed on your IIS7. And here is a little hint where to find the web extensions on IIS7 (I am still finding my ways around IIS 7): http://blogs.msdn.com/b/rakkimk/archive/2007/08/17/iis7-where-is-the-web-services-extensions-option-which-was-there-in-iis6.aspx Hope this resolves your problem. Please post your solution if you figure it out, because I will have to deploy on IIS 7 too. 😉 Good Luck!
... View more
11-05-2010
11:12 AM
|
0
|
0
|
349
|
POST
|
LOL The Flex API works similarly. Here is the link to the Flex resourses: http://help.arcgis.com/en/webapi/flex/index.html I would recommend downloading the Flex Viewer in the Quick Links on the right site of the page. It has configuration files that you can configure to fit your data, and you don't have to do any programming. There are also a lot of custom widgets created by the community and I am pretty sure there is an Attribute Query widget you can use, if it is not built in the viewer already. Sorry, I haven't played with the viewer for a while. Good Luck!
... View more
10-26-2010
10:13 AM
|
0
|
0
|
430
|
POST
|
Jason, To see what features you will get back and how Update works exactly, please go to the API reference: http://help.arcgis.com/en/webapi/silverlight/apiref/api_start.htm Find the FeatureLayer in the Client assembly, and review its Mode property and Update method. The FeatureLayer has also a Geometry property that you can use to apply a spatial filter and show only the Exxon gas stations in Texas, for example.
... View more
10-26-2010
09:20 AM
|
0
|
0
|
430
|
POST
|
Take a look at this thread, it might be what you need: http://forums.arcgis.com/threads/8582-Create-PDF
... View more
10-26-2010
06:02 AM
|
0
|
0
|
147
|
POST
|
Kevin, thank you for sharing this great tool with us. Awsome! David, I have encountered the same exception, and fixing it wasn't as straight forward as catching the error, so I have decided to share my solution and the sources I have used. Maybe someone will come with a better one. There seems to be a bug in Silverlight's SaveFileStream, which is discussed in greater details here: http://betaforums.silverlight.net/forums/p/176869/440957.aspx I have also noticed that silverPDF is a pretty big library. My .xap jumped to 990 KB from 140 KB just by adding it as reference. And of course this affects the loading time of the application. To avoid this I have implemented a dynamic loading on demand of this library when the user decides to create a PDF. Here is the article I have followed: http://msdn.microsoft.com/en-us/library/cc903931(VS.95).aspx And this is my final code: #region PDF creation
AssemblyPart apSilverPDF;
System.IO.Stream PDFStream;
/// <summary>
/// Handle "Create PDF" button click
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Button_Click(object sender, RoutedEventArgs e)
{
LoadPDFLibraryAndSaveFile();
}
/// <summary>
/// Load the silverPDF library if it hasn't been loaded already
/// or use the library if already loaded
/// </summary>
private void LoadPDFLibraryAndSaveFile()
{
SaveFileDialog savePDF = new SaveFileDialog();
savePDF.Filter = "PDF file format|*.pdf";
savePDF.DefaultExt = ".pdf";
if (savePDF.ShowDialog() == true)
{
//catch the error if the user tries to save over a file that is currently open
try
{
PDFStream = savePDF.OpenFile();
//if silverPDF library is not loaded already, load it
if (apSilverPDF == null)
{
LoadPDFLibrary();
}
else
{
//if the library is loaded, just save the PDF file
SavePDF();
}
}
catch (IOException ioe)
{
//tell the user the file is open
MessageBox.Show("Selected PDF file is open. Close the file and try again!", "Open File Error", MessageBoxButton.OK);
}
}
}
/// <summary>
/// Send a request to load the silverPDF library dynamically
/// </summary>
private void LoadPDFLibrary()
{
WebClient client = new WebClient();
client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
client.OpenReadAsync(new Uri("silverPDF.dll", UriKind.Relative));
}
/// <summary>
/// Load the library and use it to create the PDF
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
if ((e.Error == null) && (e.Cancelled == false))
{
apSilverPDF = new AssemblyPart();
apSilverPDF.Load(e.Result);
SavePDF();
}
else
{
MessageBox.Show("There was a problem loading PDF Library", "PDF Library Loading Error", MessageBoxButton.OK);
}
}
/// <summary>
/// Save the PDF File
/// </summary>
private void SavePDF()
{
PDFExporter PDFNew = new PDFExporter();
//add map to the PDF
PDFNew.SetMap(Map);
//add navigation with scale bar to the PDF
PDFNew.AddElement(navigationGrid);
PDFNew.SetOutputStream(PDFStream);
PDFNew.DoExport();
}
#endregion And in App.xaml.cs:
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
// If the app is running outside of the debugger then report the exception using
// the browser's exception mechanism. On IE this will display it a yellow alert
// icon in the status bar and Firefox will display a script error.
if (!System.Diagnostics.Debugger.IsAttached)
{
// NOTE: This will allow the application to continue running after an exception has been thrown
// but not handled.
// For production applications this error handling should be replaced with something that will
// report the error to the website and stop the application.
e.Handled = true;
//This is required to swallow an error when saving a file over a file that is open.
//This is a bug, and application crashes if this line is not there.
if (e.ExceptionObject.StackTrace.IndexOf("SaveFileStream") != -1) return;
Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
}
}
... View more
10-26-2010
05:58 AM
|
0
|
0
|
614
|
POST
|
Hi Ann, One way to acheive this could be using Dependancy Property in your UserControl:
#region Dependancy Properties
protected static readonly DependencyProperty MapProperty=
DependencyProperty.Register("Map", typeof(Map), typeof(YourUserControlName), new PropertyMetadata(OnMapPropertyChanged));
public Map Map
{
get { return (Map)this.GetValue(MapProperty); }
set
{
this.SetValue(MapProperty, (DependencyObject)value);
}
}
private static void OnMapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
(d as YourUserControlName).PopulateLayerList();
}
private void PopulateLayerList()
{
if (this.Map != null)
{
//populate your layer list here
}
}
#endregion
Then your UserControl declaration in xaml will be: [HTML] <local:WidgetControl x:Name="MyWidget" Map="{Binding ElementName=MyMap}"/> [/HTML] I haven't tested it your scenario and there might be a better approach, but it might be worth trying. Good Luck!
... View more
10-21-2010
05:20 AM
|
0
|
0
|
718
|
Title | Kudos | Posted |
---|---|---|
1 | 05-04-2022 06:11 PM | |
2 | 05-05-2023 01:24 PM | |
1 | 02-09-2023 02:52 PM | |
2 | 02-15-2023 10:49 AM | |
1 | 12-22-2022 01:36 PM |
Online Status |
Offline
|
Date Last Visited |
09-09-2024
10:59 PM
|