Search Results

Search found 417 results on 17 pages for 'visualstudio'.

Page 13/17 | < Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >

  • Entity Framework with MySQL - Timeout Expired while Generating Model

    - by Nathan Taylor
    I've constructed a database in MySQL and I am attempting to map it out with Entity Framework, but I start running into "GenerateSSDLException"s whenever I try to add more than about 20 tables to the EF context. An exception of type 'Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine+GenerateSSDLException' occurred while attempting to update from the database. The exception message is: 'An error occurred while executing the command definition. See the inner exception for details.' Fatal error encountered during command execution. Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. There's nothing special about the affected tables, and it's never the same table(s), it's just that after a certain (unspecific) number of tables have been added, the context can no longer be updated without the "Timeout expired" error. Sometimes it's only one table left over, and sometimes it's three; results are pretty unpredictable. Furthermore, the variance in the number of tables which can be added before the error indicates to me that perhaps the problem lies in the size of the query being generated to update the context which includes both the existing table definitions, and also the new tables that are being added to it. Essentially, the SQL query is getting too large and it's failing to execute for some reason. If I generate the model with EdmGen2 it works without any errors, but the generated EDMX file cannot be updated within Visual Studio without producing the aforementioned exception. In all likelihood the source of this problem lies in the tool within Visual Studio given that EdmGen2 works fine, but I'm hoping that perhaps others could offer some advice on how to approach this very unique issue, because it seems like I'm not the only person experiencing it. One suggestion a colleague offered was maintaining two separate EBMX files with some table crossover, but that seems like a pretty ugly fix in my opinion. I suppose this is what I get for trying to use "new technology". :(

    Read the article

  • Can't step into stored procedure on remote SQL Server 2008

    - by abatishchev
    I have a domain installed on virtual Windows Server 2008 x64. SQL Server 2008 Express x64 is running in Windows Server 2008 x64 and client on Windows 7 RTM x86. Both are into the domain. I'm starting both Visual Studio 2008 and SQL Server Management Studio 2008 under domain admin user. This account is a member of group sysadmin on SQL Server. Server has firewall exceptions for both TCP and UDP on ports 135-139 and 1433-1434. Visual Studio 2008 Remote debugger services is started on server and Domain Admins group is allowed to debug, When I'm starting debugging of a query in SMS I'm getting this error: Failed to start debugger Error HRESULT E_FAIL has been returned from a call to a COM component. (mscorlib) Program Location: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.OnSqlInitializeDebuggingEvent(ISqlInitializeDebuggingEvent sqlInitializeDebuggingEvent) at Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.Microsoft.VisualStudio.Debugger.Interop.IDebugEventCallback2.Event(IDebugEngine2 debugEngine, IDebugProcess2 debugProcess, IDebugProgram2 debugProgram, IDebugThread2 debugThread, IDebugEvent2 debugEvent, Guid& riidEvent, UInt32 attribute) and Unable to access the SQL Server debugging interface. The Visual Studio debugger cannot connect to the remote computer. A firewall may be preventing communication via DCOM to the remote computer. Please see Help for assistance. and Unable to start program MSSSQL://server.mydomain.local/master/sys/=0 And when stepping-in into a stored procedure using VS I'm getting the first one and this: Exception from HRESULT: 0x89710016 What have I do?

    Read the article

  • Moq broken? Not working with .net 4.0

    - by vdh_ant
    Hi guys I am receiving the following exception when trying to run my unit tests using .net 4.0 under VS2010 with moq 3.1. Attempt by security transparent method 'SPPD.Backend.DataAccess.Test.Specs_for_Core.When_using_base.Can_create_mapper()' to access security critical method 'Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotNull(System.Object)' failed. Assembly 'SPPD.Backend.DataAccess.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception. The test I am running is really straight forward and looks something like the following: [TestMethod] public void Can_create_mapper() { this.SetupTest(); var mockMapper = new Moq.Mock<IMapper>().Object; this._Resolver.Setup(x => x.Resolve<IMapper>()).Returns(mockMapper).Verifiable(); var testBaseDa = new TestBaseDa(); var result = testBaseDa.TestCreateMapper<IMapper>(); Assert.IsNotNull(result); //<<< THROWS EXCEPTION HERE Assert.AreSame(mockMapper, result); this._Resolver.Verify(); } I have no idea what this means and I have been looking around and have found very little on the topic. The closest reference I have found is this http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=80274 but its not very clear on what they did to fix it... Anyone got any ideas?

    Read the article

  • Blob container creation exception ...

    - by Egon
    I get an exception every time I try to create a container for the blob using the following code blobStorageType = storageAccInfo.CreateCloudBlobClient(); ContBlob = blobStorageType.GetContainerReference(containerName); //everything fine till here ; next line creates an exception ContBlob.CreateIfNotExist(); Microsoft.WindowsAzure.StorageClient.StorageClientException was unhandled Message="One of the request inputs is out of range." Source="Microsoft.WindowsAzure.StorageClient" StackTrace: at Microsoft.WindowsAzure.StorageClient.Tasks.Task1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task1.ExecuteAndWait() at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry[T](Func2 impl, RetryPolicy policy) at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist(BlobRequestOptions options) at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist() at WebRole1.BlobFun..ctor() in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\WebRole1\BlobFun.cs:line 58 at WebRole1.BlobFun.calling1() in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\WebRole1\BlobFun.cs:line 29 at AzureBlobTester.Program.Main(String[] args) in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\AzureBlobTester\Program.cs:line 19 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Net.WebException Message="The remote server returned an error: (400) Bad Request." Source="System" StackTrace: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler1 handler, Object sender) InnerException: Do you guys knw what is it that I am doing wrong ?

    Read the article

  • Why is jQuery so widely adopted versus other Javascript frameworks?

    - by Andrew Moore
    I manage a group of programmers. I do value my employees opinion but lately we've been divided as to which framework to use on web projects. I personally favor MooTools, but some of my team seems to want to migrate to jQuery because it is more widely adopted. That by itself is not enough for me to allow a migration. I have used both jQuery and MooTools. This particular essay tends to reflect how I feel about both frameworks. jQuery is great for DOM Manipulation, but seem to be limited to helping you do that. Feature wise, both jQuery and MooTools allow for easy DOM Selection and Manipulation: // jQuery $('#someContainer div[class~=dialog]') .css('border', '2px solid red') .addClass('critical'); // MooTools $('#someContainer div[class~=dialog]') .setStyle('border', '2px solid red') .addClass('critical'); Both jQuery and MooTools allow for easy AJAX: // jQuery $('#someContainer div[class~=dialog]') .load('/DialogContent.html'); // MooTools (Using shorthand notation, you can also use Request.HTML) $('#someContainer div[class~=dialog]') .load('/DialogContent.html'); Both jQuery and MooTools allow for easy DOM Animation: // jQuery $('#someContainer div[class~=dialog]') .animate({opacity: 1}, 500); // MooTools (Using shorthand notation, you can also use Fx.Tween). $('#someContainer div[class~=dialog]') .set('tween', {duration: 500}) .tween('opacity', 1); jQuery offers the following extras: Large community of supporters Plugin Repository Integration with Microsoft's ASP.NET and VisualStudio Used by Microsoft, Google and others MooTools offers the following extras: Object Oriented Framework with Classic OOP emulation for JS Extended native objects Higher consistency between browsers for native functions support. More easy code reuse Used by The World Wide Web Consortium, Palm and others. Given that, it seems that MooTools does everything jQuery does and more (some things I cannot do in jQuery and I can in MooTools) but jQuery has a smaller learning curve. So the question is, why did you or your team choose jQuery over another JavaScript framework? Note: While I know and admit jQuery is a great framework, there are other options around and I'm trying to take a decision as to why jQuery should be our choice versus what we use right now (MooTools)?

    Read the article

  • c# SmtpClient class not able to send email using gmail

    - by Sir Psycho
    Hi, I'm having trouble with this code sending email using my gmail account. Im pulling my hair out. The same settings work fine in Thunderbird. Heres the code. I've also tried port 465 with no luck. SmtpClient ss = new SmtpClient("smtp.gmail.com", 587); ss.Credentials = new NetworkCredential("username", "pass"); ss.EnableSsl = true; ss.Timeout = 10000; ss.DeliveryMethod = SmtpDeliveryMethod.Network; ss.UseDefaultCredentials = false; MailMessage mm = new MailMessage("[email protected]", "[email protected]", "subject here", "my body"); mm.BodyEncoding = UTF8Encoding.UTF8; mm.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure; ss.Send(mm); Heres the error "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at " Heres the stack trace at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at email_example.Program.Main(String[] args) in C:\Users\Vince\Documents\Visual Studio 2008\Projects\email example\email example\Program.cs:line 23 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

    Read the article

  • Castle ActiveRecord "Could not compile the mapping document: (string)"

    - by Nick
    Hi I am having getting an exception when trying to initialize ActiveRecord and I cannot figure out what I am missing. I am trying to convince the company I work for to use Castle ActiveRecord and it won't look good if I can't demonstrate how it works. I have work on projects before with Castle ActiveRecord and I had never experience this problem before. Thanks for your help The exception that I get is Stack Trace: at Castle.ActiveRecord.ActiveRecordStarter.AddXmlString(Configuration config, String xml, ActiveRecordModel model) at Castle.ActiveRecord.ActiveRecordStarter.AddXmlToNHibernateCfg(ISessionFactoryHolder holder, ActiveRecordModelCollection models) at Castle.ActiveRecord.ActiveRecordStarter.RegisterTypes(ISessionFactoryHolder holder, IConfigurationSource source, IEnumerable`1 types, Boolean ignoreProblematicTypes) at Castle.ActiveRecord.ActiveRecordStarter.Initialize(IConfigurationSource source, Type[] types) at ConsoleApplication1.Program.Main(String[] args) in C:\Projects\CastleDemo\ConsoleApplication1\Program.cs:line 20 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Inner Exception: {"Could not compile the mapping document: (string)"} Below is my configuration file: <add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" /> <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect" /> <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" /> <add key="connection.connection_string" value="Data Source=SPIROS\SQLX;Initial Catalog=CastleDemo;Integrated Security=SSPI" /> <add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" /> and this is the main method that runs the initialization: static void Main(string[] args) { //Configure ActiveRecord source XmlConfigurationSource source = new XmlConfigurationSource("../../config.xml"); // //Initialazi ActiveRecord ActiveRecordStarter.Initialize( source, typeof(Product)); // //Create Schema ActiveRecordStarter.CreateSchema(); // }

    Read the article

  • Visual Studio 2010 Can no longer build .NET v3.5

    - by Adam Driscoll
    I have a 2010 project that is targeting .NET v3.5. Inexplicably I can no longer build v3.5 projects. The project doesn't have ANY references added. It won't even let me add a reference to System.Core as it is added by the 'build system'. warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' IFilter.cs(82,49): error CS0433: The type 'System.Func' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Looks like something is grabbing onto 4.0 but I'm not quite sure how to fix it. Any one else run into this? Coworker had this same issue. It took a reinstall of Windows to correct the problem I've opened a bug on this one: https://connect.microsoft.com/VisualStudio/feedback/details/558245/warning-cs1685-when-compiling-a-v3-5-net-application-in-visual-studio-2010 If the compiler is set to verbose I see this: FrameworkPathOverride = C:\Windows\Microsoft.NET\Framework\v4.0.30319 which is defined as: Specifies the location of mscorlib.dll and microsoft.visualbasic.dll. This parameter is equivalent to the /sdkpath switch of the vbc.exe compiler. Some other interesting tidbits: I've created a new project all together and cannot build v3.5 at all. I can build 2.0, 3.0, 3.5 Client Profile, 4.0 and 4.0 Client Profile with no problem. VB.NET can build v3.5 but C# cannot. I've tried a reinstall of .NET 3.5, 4.0 and Visual Studio 2010 with no success. Visual Studio debug logs shown nothing interesting and Safe Mode does not work. Trying to avoid a Windows reinstall...

    Read the article

  • How set EnqueueCallBack to my generic callback

    - by CrazyJoe
    using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using Microsistec.Domain; using Microsistec.Client; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; using Microsistec.Tools; using System.Json; using Microsistec.SystemConfig; using System.Threading; using Microsoft.Silverlight.Testing; namespace Test { [TestClass] public class SampleTest : SilverlightTest { [TestMethod, Asynchronous] public void login() { List<PostData> data = new List<PostData>(); data.Add(new PostData("email", "xxx")); data.Add(new PostData("password", MD5.GetHashString("xxx"))); WebClient.sendData(Config.DataServerURL + "/user/login", data, LoginCallBack); EnqueueCallback(?????????); EnqueueTestComplete(); } [Asynchronous] public void LoginCallBack(object sender, System.Net.UploadStringCompletedEventArgs e) { string json = Microsistec.Client.WebClient.ProcessResult(e); var result = JsonArray.Parse(json); Assert.Equals("1", result["value"].ToString()); TestComplete(); } } Im tring to set ???????? value but my callback is generic, it is setup on my WebClient .SendData, how i implement my EnqueueCallback to a my already functio LoginCallBack???

    Read the article

  • Data Driven MSTest: DataRow is always null

    - by David Back
    I am having a problem using Visual Studio data driven testing. I have tried to deconstruct this to the simplest example. I am using Visual Studio 2012. I create a new unit test project. I am referencing system data. My code looks like this: namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [DeploymentItem(@"OrderService.csv")] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "OrderService.csv", "OrderService#csv", DataAccessMethod.Sequential)] [TestMethod] public void TestMethod1() { try { Debug.WriteLine(TestContext.DataRow["ID"]); } catch (Exception ex) { Assert.Fail(); } } public TestContext TestContext { get; set; } } } I have a very small csv file that I have set the Build Options to to 'Content' and 'Copy Always'. I have added a .testsettings file to the solution, and set enable deployment, and added the csv file. I have tried this with and without |DataDirectory|, and with/without a full path specified (the same path that I get with Environment.CurrentDirectory). I've tried variations of "../" and "../../" just in case. Right now the csv is at the project root level, same as the .cs test code file. I have tried variations with xml as well as csv. TestContext is not null, but DataRow always is. I have not gotten this to work despite a lot of fiddling with it. I'm not sure what I'm doing wrong. Does mstest create a log anywhere that would tell me if it is failing to find the csv file, or what specific error might be causing DataRow to fail to populate? I have tried the following csv files: ID 1 2 3 4 and ID, Whatever 1,0 2,1 3,2 4,3 So far, no dice.

    Read the article

  • Do you have ideas for a workaround for this Known bug in Visual Studio 2010's addIn model ?

    - by Jesper
    When developing AddIns for Visual Studio 2010 the following line fails: CommandBarEvents handler = (EnvDTE.CommandBarEvents)m_VSStudio.DTE.Events.get_CommandBarEvents(popup); Update: Forgot to tell that m_VSStudio is of the type DTE2 Where popup is of the type CommandBarPopup (for the type CommandBarControl it works though) The line fails with this Exception: System.Runtime.InteropServices.COMException (0x80020003): Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND)) The exact same line worked in Visual Studio 2008. The purpose of the line is to get a handler which handles clickevents, when one clicks the Popup. After som searching I found this link: http://connect.microsoft.com/VisualStudio/feedback/details/524335/events-get-commandbarevents-exception-on-submenus-reproducible-bug-addin Which basicly states that it is a known bug, which will not be fixed, because there is a workaround. But unfortunately it does not state the workaround :( I would be extremely pleased if anybody has a great idea for a workaround ? The reason why I want to listen to the click events is because I want to show or hide the submenuitems (CommandBarControl) given some condition, when one clicks a menu (CommandBarPopup). So a workaround that uses something else than the click event would also be appreciated.

    Read the article

  • Building Web Application project using MSBuild from command line on 64-bit: missing targets file

    - by James Allen
    Building a solution containing a web application project using MSBuild from powershell like this: msbuild "/p:OutDir=$build_dir\" $solution_file Works fine for me on 32-bit, but on a 64-bit machine I am running into this error: error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. I am using Visual Studio 2008 and powershell v2. The problem has already been documented here and here. Basically on 64-bit install of VS, the Microsoft.WebApplication.targets needed by MSBuild is in the Program Files(x86) dir, not the Program Files dir, but MSBuild doesn't recognise this and so looks in the wrong place. The two solutions are not ideal: Manually copy the file on 64-bit from Program Files(x86) to Program Files. This is a poor solution - every dev will have to do this manually. Manually edit the csproj file so MSBuild looks in the right place. Again not ideal: I would rather not have to get everyone on 64bit to manually edit csproj files on every new project. e.g. <Import Project="$(MSBuildExtensionsPathx86)\$(WebAppTargetsSuffix)" Condition="Exists('$(MSBuildExtensionsPathx86)\$(WebAppTargetsSuffix)')" /> Ideally I want a way to tell MSBuild to import the target file form the right place from the command line but I can't work out how to do that. Any solutions?

    Read the article

  • Display HTML page in Office 2003 or 2007 task pane via VBA

    - by Malcolm
    Is it possible to display an HTML page in an Office 2003 and/or 2007 task pane via VBA? Background: We have a complicated configuration file that our users maintain in Word (using a real editor is not an option for our audience). We would like to create several toolbar buttons that display a basic HTML page in a task pane as a form of online help for our users. The reason we want to use a task pane to display help (vs. an external browser or traditional help engine) is so that the help content is "embedded" in Word vs. displayed via a seperate application. The problem with using a regular browser or help engine to display help is that users have to manually size and position both applications so that they can see them simultaneously and its very easy to "lose" one application when togging between many applications. We don't want to go down the route of writing a VisualStudio based task pane component - we want to keep things simple (KISS) and encapsulate everything in an easy to distribute Word template file (.dot or dotx.). Suggestions?

    Read the article

  • Informix, NHibernate, TransactionScope interaction difficulties

    - by John Prideaux
    I have a small program that is trying to wrap an NHibernate insert into an Informix database in a TransactionScope object using the Informix .NET Provider. I am getting the error specified below. The code without the TransactionScope object works -- including when the insert is wrapped in an NHibernate session transaction. Any ideas on what the problem is? BTW, without the EnterpriseServicesInterop, the Informix .NET Provider will not participate in a TransactionScope transaction (verified without NHibernate involved). Code Snippet: public static void TestTScope() { Employee johnp = new Employee { name = "John Prideaux" }; using (TransactionScope tscope = new TransactionScope( TransactionScopeOption.Required, new TransactionOptions() { Timeout = new TimeSpan(0, 1, 0), IsolationLevel = IsolationLevel.ReadCommitted }, EnterpriseServicesInteropOption.Full)) { using (ISession session = OpenSession()) { session.Save(johnp); Console.WriteLine("Saved John to the database"); } } Console.WriteLine("Transaction should be rolled back"); } static ISession OpenSession() { if (factory == null) { Configuration c = new Configuration(); c.AddAssembly(Assembly.GetCallingAssembly()); factory = c.BuildSessionFactory(); } return factory.OpenSession(); } static ISessionFactory factory; Stack Trace: NHibernate.ADOException was unhandled Message="Could not close IBM.Data.Informix.IfxConnection connection" Source="NHibernate" StackTrace: at NHibernate.Connection.ConnectionProvider.CloseConnection(IDbConnection conn) at NHibernate.Connection.DriverConnectionProvider.CloseConnection(IDbConnection conn) at NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Release() at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) at NHibernate.Cfg.Configuration.BuildSessionFactory() at HelloNHibernate.Employee.OpenSession() in D:\Development\ScratchProject\HelloNHibernate\Employee.cs:line 73 at HelloNHibernate.Employee.TestTScope() in D:\Development\ScratchProject\HelloNHibernate\Employee.cs:line 53 at HelloNHibernate.Program.Main(String[] args) in D:\Development\ScratchProject\HelloNHibernate\Program.cs:line 19 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: IBM.Data.Informix.IfxException Message="ERROR - no error information available" Source="IBM.Data.Informix" ErrorCode=-2147467259 StackTrace: at IBM.Data.Informix.IfxConnection.HandleError(IntPtr hHandle, SQL_HANDLE hType, RETCODE retcode) at IBM.Data.Informix.IfxConnection.DisposeClose() at IBM.Data.Informix.IfxConnection.Close() at NHibernate.Connection.ConnectionProvider.CloseConnection(IDbConnection conn) InnerException:

    Read the article

  • Delegates in .NET: how are they constructed ?

    - by Saulius
    While inspecting delegates in C# and .NET in general, I noticed some interesting facts: Creating a delegate in C# creates a class derived from MulticastDelegate with a constructor: .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } Meaning that it expects the instance and a pointer to the method. Yet the syntax of constructing a delegate in C# suggests that it has a constructor new MyDelegate(int () target) where I can recognise int () as a function instance (int *target() would be a function pointer in C++). So obviously the C# compiler picks out the correct method from the method group defined by the function name and constructs the delegate. So the first question would be, where does the C# compiler (or Visual Studio, to be precise) pick this constructor signature from ? I did not notice any special attributes or something that would make a distinction. Is this some sort of compiler/visualstudio magic ? If not, is the T (args) target construction valid in C# ? I did not manage to get anything with it to compile, e.g.: int () target = MyMethod; is invalid, so is doing anything with MyMetod, e.g. calling .ToString() on it (well this does make some sense, since that is technically a method group, but I imagine it should be possible to explicitly pick out a method by casting, e.g. (int())MyFunction. So is all of this purely compiler magic ? Looking at the construction through reflector reveals yet another syntax: Func CS$1$0000 = new Func(null, (IntPtr) Foo); This is consistent with the disassembled constructor signature, yet this does not compile! One final interesting note is that the classes Delegate and MulticastDelegate have yet another sets of constructors: .method family hidebysig specialname rtspecialname instance void .ctor(class System.Type target, string 'method') cil managed Where does the transition from an instance and method pointer to a type and a string method name occur ? Can this be explained by the runtime managed keywords in the custom delegate constructor signature, i.e. does the runtime do it's job here ?

    Read the article

  • Debugger Visualizer, ElementHost, and Edit and Continue problems

    - by Frank Fella
    I recently wrote a custom Debugger Visualizer for Visual Studio 2008 for one of the custom types in my application. The UI for the visualizer is written in WPF and is hosted in an element host and shown using the IDialogVisualizerService windowService object. Everything works great, and my visualizer loads and shows the relevant information, but if try to "edit and continue" in my application after loading the visualizer, Visual Studio crashes with no useful error message. In trying to debug this I removed almost all of my code from the solution to the point where I was only serializing a string with the ObjectSource and displaying just an empty element host and I still get the crash on edit and continue. If I remove the element host and show a WinForms control or form there is no crash. Here is the Visualizer code: using System; using System.Drawing; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Windows.Forms; using System.Windows.Forms.Integration; using Microsoft.VisualStudio.DebuggerVisualizers; using ObjectVisualizerShared; using ObjectVisualizerUI; namespace ObjectVisualizer { public class Visualizer : DialogDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { try { Stream stream = objectProvider.GetData(); if (stream.Length > 0) { BinaryFormatter formatter = new BinaryFormatter(); VisualizerNode node = (VisualizerNode)formatter.Deserialize(stream); if (node != null) { VisualizerWindow window = new VisualizerWindow(node); ElementHost host = new ElementHost(); host.Child = window; host.Dock = DockStyle.Fill; host.Size = new Size(800, 600); windowService.ShowDialog(host); } } } catch (Exception ex) { MessageBox.Show(string.Format("Error!\n{0}", ex), "Object Visualizer"); } } } } Any ideas?

    Read the article

  • STOP Application Pool Issue Programitically IIS7

    - by Sumit Kute
    In my application I needs to stop a application pool programmitically in IIS 7. I have created a local acccount and given him Administrative Priviledges. Here is the code Private static void StopApplication() { string serviceHostDeploymentType = "local"; if (serviceHostDeploymentType.Equals("local")) { WindowsIdentityImpersonate newIdentity = new WindowsIdentityImpersonate(); if (newIdentity.Impersonate("AccountName", Environment.MachineName, "Password")) { try { ServerManager serverManager = ServerManager.OpenRemote("Server"); string siteName = GetWebSiteNameById(serverManager, 1); Site parentWebsite = serverManager.Sites[siteName]; if (parentWebsite != null) { ApplicationPool apppool = serverManager.ApplicationPools["Application Pool Name"]; if (apppool != null) { apppool.Stop(); } } } finally { newIdentity.Undo(); } } } else { throw new ConfigurationErrorsException("..."); } } I am getting an error Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). Stack Trace at Microsoft.Web.Administration.Interop.IAppHostMethodInstance.Execute() at Microsoft.Web.Administration.ConfigurationElement.ExecuteMethod(String methodName) at Microsoft.Web.Administration.ApplicationPool.Stop() at ServerManagerTesting.Form1.StopApplication() at ServerManagerTesting.Form1.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at ServerManagerTesting.Program.Main() at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

    Read the article

  • How to open a help webpage after installation is complete

    - by Kapil
    I have built an installer for my windows app using the VisualStudio 2008 IDE. I also use some custom-actions to do a few extra stuff at the time of installation/uninstallation. What I also want to do is that when the installation is completed, the installer should launch a help webpage or a getting-started page for the users to know how to go ahead with the app. I am doing the following for this: private void CustomInstaller_Committed(object sender, InstallEventArgs e) { System.Windows.Forms.LinkLabel lbl = new System.Windows.Forms.LinkLabel(); lbl.Links.Remove(lbl.Links[0]); lbl.Links.Add(0, lbl.Text.Length, "http://www.mywebsite.com/help.aspx"); ProcessStartInfo pInfo = new ProcessStartInfo(lbl.Links[0].LinkData.ToString()); Process.Start(pInfo); } Also, I set the event handler as such: this.Committed += new InstallEventHandler(CustomInstaller_Committed); This is launching the webpage, but not at the right point in the flow where I would have wanted it. It launches the IE browser even before the user dismisses the installation window (i.e clicks 'Close' in the Installation Completed dialog box). I want the webpage to open only when the user finally dismisses the installation. Any ideas how can I achieve this? Thanks, Kapil

    Read the article

  • Reduce number of config files to as few as possible

    - by Scott
    For most of my applications I use iBatis.Net for database access/modeling and log4Net for logging. In doing this, I need a number of *.config files for each project. For example, for a simple application I need to have the following *.config files: app.config ([AssemblyName].[Extention].config) [AssemblyName].SqlMap.config [AssemblyName].log4Net.config [AssemblyName].SqlMapProperties.config providers.config When these applications go from DEV to TEST to PRODUCTION environments, the settings contained in these files change depending on the environment. When the number of files get compounded by having 5-10 (or more) supporting executables per project, the work load on the infrastructure team (the ones doing the roll-outs to the different environments) gets rather high. We also have a high risk of one of the config files being missed, or a mistype in the config file. What is the best way to avoid these risks? Should I combine all of the config files into one file? (is that possible with iBatis?) I know that with VisualStudio 2010 they introduce transforms for these config files that allow the developer to setup all the settings for the different environments and then dynamically (depending on the build kicked off) the config files get updated to the correct versions. (VS 2010 - transforms) Thank you for any help that you can provide.

    Read the article

  • Using Directives, Namespace and Assembly Reference - all jumbled up with StyleCop!

    - by Jack
    I like to adhere to StyleCop's formatting rules to make code nice and clear, but I've recently had a problem with one of its warnings: All using directives must be placed inside of the namespace. My problem is that I have using directives, an assembly reference (for mocking file deletion), and a namespace to juggle in one of my test classes: using System; using System.IO; using Microsoft.Moles.Framework; using Microsoft.VisualStudio.TestTools.UnitTesting; [assembly: MoledType(typeof(System.IO.File))] namespace MyNamespace { //Some Code } The above allows tests to be run fine - but StyleCop complains about the using directives not being inside the namespace. Putting the usings inside the namespace gives the error that "MoledType" is not recognised. Putting both the usings and the assembly reference inside the namespace gives the error 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type'. All attributes in this block will be ignored. It seems I've tried every layout I can but to no avail - either the solution won't build, the mocking won't work or StyleCop complains! Does anyone know a way to set these out so that everything's happy? Or am I going to have to ignore the StyleCop warning in this case?

    Read the article

  • Resizing window causes black strips

    - by Paja
    I have a form, which sets these styles in constructor: this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); And I draw some rectangles in Paint event. There are no controls on the form. Hovewer, when I resize the form, there are black strips at right and bottom of the form. Is there any way to get rid of them? I've tried everything, listening for WM_ERASEBKGND in WndProc, manually drawing the form on WM_PAINT, implementing custom double buffer, etc. Is there anything else I could try? I've found this: https://connect.microsoft.com/VisualStudio/feedback/details/522441/custom-resizing-of-system-windows-window-flickers and it looks like it is a bug in DWM, but I just hope I can do some workaround. Please note that I must use double buffering, since I want to draw pretty intense graphic presentation in the Paint event. I develop in C# .NET 2.0, Win7.

    Read the article

  • Can't access CodeBase from a dynamically generated assembly.

    - by Michael Meadows
    I'm trying to create an assembly dynamically in .Net. I can't seem to figure out how to get the CodeBase property to return a value, however. Here's an example: var assemblyName = new AssemblyName { Name = "Whatever", CodeBase = Directory.GetCurrentDirectory() }; var assemblyBuilder = AppDomain.CurrentDomain .DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); var moduleBuilder = assemblyBuilder.DefineDynamicModule("WhateverModule", "Whatever.dll"); var typeBuilder = moduleBuilder.DefineType("WhateverType", TypeAttributes.Public); var type = typeBuilder.CreateType(); assemblyBuilder.Save("Whatever.dll"); var codeBase = type.Assembly.CodeBase; // throws the below exception System.NotSupportedException was unhandled Message=The invoked member is not supported in a dynamic assembly. Source=mscorlib StackTrace: at System.Reflection.Emit.InternalAssemblyBuilder.get_CodeBase() at Stupid.Program.Main(String[] args) in C:\Users\Walking Disaster\Documents\Visual Studio 10\Projects\Lingual.Proxy\Stupid\Program.cs:line 25 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Can anyone see what I'm doing wrong?

    Read the article

  • nServiceBus - No all commands being received by handler

    - by SimonB
    In a test project based of the nServiceBus pub/sub sample, I've replace the bus.publish with bus.send in the server. The server sends 50 messages with a 1sec wait after each 5 (ie 10 burst of 5 messages). The client does not get all the messages. The soln has 3 projects - Server, Client, and common messages. The server and client are hosted via the nServiceBus generic host. Only a single bus is defined. Both client and server are configured to use StructureMap builder and BinarySerialisation. Server Endpoint: public class EndPointConfig : AsA_Publisher, IConfigureThisEndpoint, IWantCustomInitialization { public void Init() { NServiceBus.Configure.With() .StructureMapBuilder() .BinarySerializer(); } } Server Code : for (var nextId = 1; nextId <= 50; nextId++) { Console.WriteLine("Sending {0}", nextId); IDataMsg msg = new DataMsg { Id = nextId, Body = string.Format("Batch Msg #{0}", nextId) }; _bus.SendLocal(msg); Console.WriteLine(" ...sent {0}", nextId); if ((nextId % 5) == 0) Thread.Sleep(1000); } Client Endpoint: public class EndPointConfig : AsA_Client, IConfigureThisEndpoint, IWantCustomInitialization { public void Init() { NServiceBus.Configure.With() .StructureMapBuilder() .BinarySerializer(); } } Client Clode: public class DataMsgHandler : IMessageHandler<IDataMsg> { public void Handle(IDataMsg msg) { Console.WriteLine("DataMsgHandler.Handle({0}, {1}) - ({2})", msg.Id, msg.Body, Thread.CurrentThread.ManagedThreadId); } } Client and Server App.Config: <MsmqTransportConfig InputQueue="nsbt02a" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress=""> <MessageEndpointMappings> <add Messages="Test02.Messages" Endpoint="nsbt02a" /> </MessageEndpointMappings> </UnicastBusConfig> All run via VisualStudio 2008. All 50 messages are sent - but after the 1st or 2nd batch. only 1 msg per batch is sent? Any ideas? I'm assuming config or misuse but ....?

    Read the article

  • Deployment Setup (.Net) - Search target machine -> Registry search (64 bit)

    - by Joonas Kirsebom
    I have a windows installer project which installs some software (winform, service, mce addin). During the installation I need to search the machine for a registry key. This is done with with the "Launch Condition" - "Add Registry Search" (Deployment Project). I have filled out all the properties right, and checked against the regestry that the value actually can be found. The problem is that the "Registry Search" searches in the x86 part of the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\...) although my system is a x64 and the deployment setup is also set to x64. Does anyone know how to force the "Registry Search" to search the x64 registry? Or know about a workaround? The weird thing about this, is that Registry setting in the deployment setup is writing to the right registry (x64). My idea is that the "Registry Search" program is only developed to the x86 architecture, and therefore can't read the right registry. I found this article from microsoft, so it seams that they know about this problem. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=110105&wa=wsignin1.0#details My system is: Windows 7 64bit Visual Studio 2008

    Read the article

  • F# Async problem.

    - by chrisdew
    Hi, I've written a dummy http server as an exercise in F#. I'm using Mono 2.4.4 on Ubuntu 10.04 x86_64, with MonoDevelop. The following code fails to compile with the error: Error FS0039: The field, constructor or member 'Spawn' is not defined (FS0039) Could someone try this in VisualStudio please, I don't know whether this is a Mono problem, or my problem. I have tried several Async examples from the F# book, and they also all produce similar messages about Async.* methods. Thanks, Chris. #light open System open System.IO open System.Threading open System.Net open System.Net.Sockets open Microsoft.FSharp.Control.CommonExtensions printfn "%s" "Hello World!" let headers = System.Text.Encoding.ASCII.GetBytes("HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length: 37\r\nDate: Sun, 13 Jun 2010 05:30:00 GMT\r\nServer: FSC/0.0.1\r\n\r\n") let content = System.Text.Encoding.ASCII.GetBytes("<html><body>Hello World</body></html>") let serveAsync (client : TcpClient) = async { let out = client.GetStream() do! out.AsyncWrite(headers) do! Async.Sleep 3000 do! out.AsyncWrite(content) do out.Close() } let http_server (ip, port) = let server = new TcpListener(IPAddress.Parse(ip),port) server.Start() while true do let client = server.AcceptTcpClient() printfn "new client" Async.Spawn (serveAsync client) http_server ("0.0.0.0", 1234)

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >