3
votes

I have just installed Visual Studio LightSwitch 2011. Every screen that I've created has the same red X with the message "Unable to load data."

I'm creating a desktop application which will have all components, including tech database, on the same machine.

The machine is Windows 7 Home Premium, stand-alone, running Visual Studio 2010 C# Express, SQL Server 2008 R2 Express and Visual Studio LightSwitch 2011 (evaluation period). The database I'm trying to use is a pre-existing database on the local SQL Server Express instance. Other C# apps can use this database.

Currently, the machine has no Internet connectivity since I'm traveling. It shouldn't need it, but I wonder...

Two questions:

1 - Is there anything in the configuration that suggests what may be happening?

2- How do I find the real meaning behind the red X? I've seen articles on how to use Asp.net tracing, but I don't have IIS available. I can only run as a local desktop. Is there a log somewhere that details the error?

-- Update: I haven't found the error, but it's in the project configuration somewhere. I created a new project, connected to the same database, just one table, changed as little as possible, and it runs successfully. Though my problem isn't solved yet, I'm greatly relieved that it can actually work.

2
The meaning of the red X is that you cannot connect to the database. The reasons for it are various. Can you expand your question to include the following information: Are you using Visual Studio Lightswitch 2011 (V1 Standalone) or Visual Studio 2012 RC (which incorporates Lightswitch V2)? Are you creating a desktop app or a web app? If it's a web app, what browser are you using?embedded.kyle
The answer to the question here ( stackoverflow.com/questions/16520105/… ) may help you debug the problem.steenhulthin

2 Answers

3
votes

This message seems to be misleading. When you include a table into lightswitch, all of the string fields are marked as searchable. I have a table with 124 columns and most of them are string. I was getting the same error message "Unable to load data, check network connection." When I reduced the number of searchable columns to 20, the message went away.

0
votes

Red X problems are often related to permissions. Especially with an attached SQL database. Have you checked that whoever is running tha app has sufficent permissions to access the database?