Problem
When I test my project on live environment, it works perfect. All connections are properly made and both edmx will work properly.
However, when I publish it to our webserver, one of the edmx files will return a "The remote server returned error: Not Found"
(see picture)
Information
We are using a silverlight 5 project with IdeaBlade v6.1.7.0, Caliburn.Micro v1.3.1.0 and MefContrib.Silverlight v1.1.0.0
We have put a seperate Class Library with our edmx files in there.
We have 2 edmx files. One for normal data and one for localization.
Currently I have found out that the EDMX for StaticContent does not work! it will always return the error shown in the image above.
But when I test it on my local machine things work perfectly.
I am looking for anyone that can help me in anyway, if more information is needed; feel free to ask.
List of things I've already tried
I've tried to re-add the staticcontent edmx.
I've tried to combine them but this resulted in a lot more errors and difficulties.
I've tried to set the staticcontent edmx datasource key to the same as the other edmx
All custom dll's are set to "Copy Local = true"
You'll get the NotFound error on a client when it can't communicate with the EntityServer. This generally doesn't have anything to do with the EDMX itself, unless you're using data source extensions with each model.
Unfortunately, there are many reasons why a client won't be able to communicate with the server. You can first check if the service is running by navigating to its service page, as described here. If there's a problem with the service you'll see errors shown on this page.
Also see this page for information on deployment steps, to see if you've got everything needed.
Related
So, I'm mantaining a software an ex co-worker did.
He uses an xsd to create TableAdapters for his reports and other stuff.
The thing is, I need to add a new TableAdapter and I get the aforementioned error. It also says the dread "A network-related or instance-specific error occurred while establishing a connection to SQL Server."
I am at loss here and I don't know what to do. Here are the facts:
I have 2 connection strings, one for the production environment and one for the development environment (my computer).
When I go to settings and then the edit window of the connection string, I hit "test connection" and it says it works fine.
Both SQL Server 2008R2 and Visual Studio 2010 are on the same machine, my machine.
I do not have a named instance.
I right click on the xsd design view and click "Add -> TableAdapter" and use the local connection string (the one I already tested and worked)
I click "Use existing stored procedures" and then hit [Next]. Then I am able to pick a stored procedure for the Select section and I can see the columns.
I click finish, the system locks for a while and then I get the error.
Named Pipes, TCP/IP are enabled in SQL Server configuration.
I'm kinda lost and I already wasted 2 days on this. I have tried what little I know and nothings works. I hope I can find help within your wisdom.
Sorry for the long post but I wanted to provide as much info as I could in one single shot.
OK, After some trial and error, I found the solution. At least, I made it work on my environment.
What #Rusland said, made me think and I searched for another Settings file. It did not exist. I decided then to erase the connection strings and the Settings file to see if the project compiled. As expected, it threw a ton of errors.
So, it was not the file.
I decided to add one by one the connection strings and test as I added them. The first one that I added, was the connection string used in development (localConStr). The configuration of the table adapter was as shown in the first image. As you can see, localConStr is selected (as has always been) only this time, having only one connection string I received an error, a different error than before. The one in the second image.
How could it be possible for the TableAdapter to ask for that Connection String if there were no refferences to it? I deleted it and the Connection property of my table adapter was set to the localConStr. So... I did what any desperate man would do: CTRL+F and find all refferences to rptTbl_loansAgingTableAdapter. My only reasoning was that somewhere in the code, the connection string was probably hardcoded by my predecessor. One thing worth mentioning: I specifically used "loansAgingTableAdapter" as the search criteria because that's the one TableAdapter I was trying to modify in the first instance.
After some minutes, I was navigating the XSD at code level (it's just an XML) and to my surprise, I found an element named Connection and there was not one but TWO!. Just to make things clear, this file has been untouched by me till today (I mean, I did not touch it by hand, any changes had been made by the IDE)
The two connection strings were:
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="localConStr"...
and
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="loanConStr" ...
Yes, I know they look very alike, but notice they are local and loan. I decided to delete the second one (loanConStr) since it was not in my Settings file anymore (loanConStr was the original connection string left by my predecessor, localConStr was created by me so that I could switch connection strings in runtime instead of modifying the connection string and recompile every time I had to make a change and deploy again).
After that, I made sure all the DataTables in my DataSet used the same connection string (localConStr) and recompiled. I then tried the things that were giving me troubles:
First: I created a new DataTable: the action was successful
Second: I modified an existing DataTable: success again
Last, but not least, I tried to execute the report. I ran the app and went to the report and success! Apparently, my problem is solved.
What had happened? I am not sure, but if I had to guess, I would say that the TableAdapter was trying to use a connection string that pointed to a server that did not exist in my network (my client's server) so, every time I tried to configure it or change anything, Visual Studio was unable to contact that server and that's why I gor the connection error.
Why was the TableAdapter trying to use that connection string when the local connection string was explicitly specified? I don't know, but leavin IN THE XSD only one connection string was my solution.
As a side note, you might ask "But Compa, what will happen when the user wants to run a report that uses the localConStr?" Simple, I change the connection string at runtime when the report window is opened with the one being used by the whole app.
Sorry for the long post, and if you want a TL;DR version:
Go to your xds dataset file, delete any unwanted connection strings and then go to design view and make sure all your TableAdapters use the only ConnectionString specified in your xsd
It looks like you're seeing the database just fine. (Thus you get a list of stored procedures).
Try the rights on the procedure itself.
GRANT EXECUTE on [dbo].[rpt_loansAging] to [TheSqlAuthenticationUserNameWeCannotSeeInTheScreenShot]
APPPEND
Since you've tried everything else, try opening up a new VS project (Same version of VS and Target Framework) and try adding a TableAdapter in the same way.
If that works, then you got voodoo going on. You could delete and recreate them in the original project.
Every blue moon, something goes awry with Visual Studio, ESPECIALLY projects that started out as VS2003, were upgraded to VS2005, maybe upgraded to VS2010 (whatever combination).
I had a project that I upgraded from VS2003 to VS2005, and it built fine on my computer. On the build machine, it started failing........No idea what it was.
I ended up seeing some small anomaly in the "By Project" references. I simply removed all "By Project" references (within the .sln solution) ... and re-added the "By Project" references, and it fixed everything.
Go figure.
This one is killing me. I get the above error in the following line of code:
return (from orderItemSubTypes in dbOrders.OrderItemSubTypes
select new OrderItemSubType
{
OrderItemSubTypeID = orderItemSubTypes.OrderItemSubTypeID,
Name = orderItemSubTypes.OrderItemSubType
}).ToList<OrderItemSubType>();
This is from a WPF application which runs fine. I came across the error when trying to set up a context for my unit tests i.e. it appears in Nunit. I have created a console app and added my WPF app as a reference. This also gives the same error. dbOrders does contain a table called OrderItemSubType according to intellisense. Also, this is the third call to the database in the setting up sequence. The other calls are on other tables and work with no problem.
I have tried removing and re-adding the table via the designer and also deleting the table from the database and re-adding it. I have also tried a different name for the table.
Why would the query work fine in the WPF app but not when called from another project with the wpf app added as a reference?
I am using VS2013 and SQLServerExpress 10.50. and Nunit for my unit tests. I'm not using Entity Framework or anything else. I'm simply creating tables using the SQL Server Object Explorer and then adding the tables to the .dbml file using the designer. The whole development is standalone on a single PC.
I've tried to look for a solution but the problem is the generic nature of the error that comes back.
Thanks in advance for any help.
You probably found your answer 2 years ago, but if anyone finds this later:
I had a similar issue and solved it by hitting the separate database.publish.xml I have in my SQL Project for tests. (I thought I had hot both the main DB and integration test DB publish scripts, but I guess I hadn't).
I use Visual Studio Team Services to store the source code of my projects as I work on them, I love the service, especially that it is free, but I have been running into the biggest pain lately.
Randomly when I go to save, modify, check in check out I get this error for every single file I am modifying. So if I am trying to save changes to 8 files I get this message 8 times and it takes 45 60 seconds of trying to check out for each file meaning to takes 6 - 8 minutes for the errors to stop (even if I hit cancel).
The local data store is currently in use by another operation
I looked it up online and found many people with the same issue but the response from MS has nothing to do with my situation.
http://blogs.msdn.com/b/phkelley/archive/2013/05/31/tf400030-the-local-data-store-is-currently-in-use-by-another-operation.aspx
It basically says this can happen when you have to many files in your workspace or have several large solution open at once.
This does not apply to me as I usually only have on solution open at a time and my projects are very small (400 -500 files).
Ran into this issue as well on VS 2013 and TFS - every time I opened my team explorer it would take 10+ seconds to show all projects, then when I would expand the project in source control, another 10+ seconds would roll by.
Earlier today I began to experience the "local storage is being used" error when trying to save data in class files. I did some original research, and this following link saved the day for sure. Now TFS is blazing!
Local Data Store Solved
What you do is edit workspace (including all projects associated), and change the "Location" dropdown from "Local" to "Server". It took about 4-5 minutes for the changes to finish, but well worth it.
Hopefully this will help someone down the road.
Lately I started to get same error message and Visual Studio started to work very slow with TFS and nuget. I have tried repair and uninstall but not solve the problem. At the and it was so painfully slow that I cannot continue working. (Expanding one item on source control explorer takes 10 seconds)
Here is my story and how my problem be solved:
I was mapped tfs folders separately not to get whole TFS because there are lots of irrelevant documents. After trying lots of fix suggestion, I thought this might be the problem because I did this separate mapping first time while I have been using TFS. I generally map and get all items at once and never met this issue before.
I removed all mappings and it was like magic. Error is gone, slow TFS source control is gone and it is rocket fast now. Just to be in a safe side I also delete my workspaces and create a new one and get all TFS items at once.
I found the error would be triggered when I had more than once instance of VS 2012+ running utilizing Source Control Explorer, Solution Explorer and/or Team Explorer windows. I've not had this problem when running a single instance of VS 2012+ (on updates 2+) utilizing Source Control Explorer, Solution Explorer and/or Team Explorer windows in tandem.
I found this article and gave it's suggestion a shot: to prevent multiple threads from accessing the data store simultaneously.
http://blogs.msdn.com/b/phkelley/archive/2013/05/31/tf400030-the-local-data-store-is-currently-in-use-by-another-operation.aspx
This proved to be a remedy for this issue.
I would add for other users with large file repositories, using source control and share this issue, it may be greatly beneficial to create multiple workspaces for each of your branches/repositories. I found that by doing this my queries to TFS sped up immensely and also helped with this error. I found this suggestion here: http://blogs.msdn.com/b/phkelley/archive/2013/05/30/using-multiple-workspaces-with-visual-studio.aspx. I share this as users mention TFS running slowly.
I also started getting the same error this week. Maybe there's something wrong with VS Update 3?
Simply could not work on any of the projects of the "broken" local workspace anymore.
VS would show all files as being checked out, but none were really.
Other local workspaces were working fine.
I tried removing a project from the workspace, but when trying to confirm it, I would receive the same TF400030 error again.
Suggestion
If nothing else works, you might want to try this: simply delete the whole workspace and create it again, this time separating projects into different workspaces. This worked for me.
You'll probably want to back up your files first.
I did as mentioned below and TFS started working fine
Close all the VS instances
Go to: C:\Users[UserName]\AppData\Local\Microsoft\VisualStudio\15.0_46af8b8e
Delete the privateregistry.bin file
Reopen the project solution
Above worked for me.
Had the same problem,can be fixed in 3 quick steps:
Remove current Workspace: Source Control Explorer->Work Space ListBox->workspaces... and remove the workspace.
- Make sure that all pending changes are checked in
Delete Workspace local folder.
- Its Better to delete the folder entirely.If eventually keeping some folders make sure to delete all $tf folders (hidden folders inside the workspace folder)
Remap the projects you need ( the less the better )
Hopes that helps.
In my case the cause was a compressed folder containing my local data store, shown in blue in Windows explorer. Removing the compression did the trick.
I ran into this error when renaming my workspace. After changing back to original everything worked fine again
Restarting the Visual studio resolved the issue for me.
We have this very strange error in Asp.Net MVC 4 Razor whereby within the View, we have the following code:
#Html.InlineEditingContentText(CS.General_v4.Enums.HtmlTagName.Span, VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title, "weather-widget-title masterpage-widget-title")
InlineEditingContentText is an extension method which we have internally. The 2nd parameter being passed is an enumeration parameter and as you can see from above, the value is VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title. Now when you debug into the extension method InlineEditingContentText, the actual 2nd parameters being received is not VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title but VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Header_LoggedOutText which happens to be the next value of the ContentTextIdentifier enumeration after VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title.
We are not assigning values to the enumerations and so their respective int values increment after each other automatically.
Strangely enough, if we load the exact same project on another workstation, this works fine.
Also, if we perform some changes to the View (like just add a whitespace) and save, this also works fine.
Any possible insight into why this strange issue is happening?
Edit #1: Also, when we uploaded the website on the deployment server, after compiling using same workstation, the error was carried over as well
Edit #2: 2013-10-22 > We are still getting this same problem, even when then deploying the files on the actual production server, such incorrect enum values are being carried over. The only way to solve the issue is to delete the Views from the server / locally, and re-overwriting them again. Any idea how we can solve this issue? We shouldn't be caching Views so can't really understand why this is happening? Would appreciate any form of help!
Most likely cached files have not been cleaned. It might happen occasionally.
If you use IIS delete corresponding Temporary ASP.NET folder. For example, if your project is 64bit Framwork 4.0 then path would be:
%WinDir%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
If you use IIS Express or similar you might need to stop it and start again.
Updating Razor file forced dynamic compilation and that solved the your issue.
I have changed my app name and namespaces as well from FooXXX to FooYYY.
VS applied changes to all files. I've checked all namespaces, names etc, project compiles but when I want to deploy it to emulator or to a device it crashes straight away. No warring, no message, no exception. Only spash screen is shown and then OS gets back to start screen.
I made a copy of this solution and I've changed all names, namspaces again and now app compiles and deploys, but I have two messages:
Message 2 Could not find schema information for the element 'http://schemas.microsoft.com/client/2007/deployment:Deployment.Parts'.
Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/client/2007/deployment:Deployment'.
Any clue what casuses the crash?
Check the "Startup Object" in the project properties page. The sometimes requires manually being set/corrected when the namespace of the app is changed.
I had the same problem but it was due to the WCF RIA Services link.
In the project properties change the WCF RIA Services link to
Save and close the tab
Change to the previous link
Save
I got a problem like this and it was a problem inside WMAppManifest.xml file under Properties. Look at the TokenId, default page etc...
To resolve this, I actually just restarted VS2012.