C# - Can The Microsoft TextTransform Utility Be Used Standalone
Dec 22, 2010
Can the Microsoft TextTransform utility be used standalone? Since VS2010 is it still true as I can read: [URL] Preprocessed templates to allow embedding of template-based generation in arbitrary applications without a runtime T4 dependency. There is a new custom tool, new service APIs and new engine APIs to support this feature.
I'm trying to unit test the logOn method of my .Net 4.0 MVC application. I'm pretty sure I need to mock a bunch of objects because I don't want to hit the actual database and I only want to simulate an HTTPcontext in a limited and specific way (if I have to do it at all). All the examples I've found online use mocking frameworks like Moq, RinoMocks or nMock. MVC is all about Test Driven Development, there must be some way to do simple tests without using third party software.
The specific problem,The basic problem is that the controller I'm testing calls Response.Cookies.Add(...) but since the unit test is not in an HTTPContext, Response is null and I get an exception.
My research so far,I understand there is a layer of abstraction which will help me somehow. For example HttpResponse inherits from HttpResponseBase. I think I'm supposed to make a class that inherits from one of the MVC base classes, overload some of the members and then call the method I want to test in a way that gives it my object instead of one it would normally use.
The question is how to do that. One would need to set up existing code with the ability to construct future versions of objects. Intuitively however, it would seem that existing code could only be and use functionality that existed at the time it was written. Fortunately, a dynamic runtime means that the code which is actually run can be determined things that change after it is written like config files and HTTP headers.
One way to do that is for the existing code to use some method typically referred to as a factory that takes a string and returns an instance of an object.I conclude that I should look through the code for this factory and figure out how to manipulate it.
My background,I've recently graduated with a degree in Computer Science. Now at my new job, I've been assigned to write unit tests for a large project. Admittedly, I'm new to MVC, many aspects of C# and large projects in general. I may have made simple mistakes or incorrect assumptions in my analysis of this problem. I will do my best to stay active on this post and make it useful for others in situations similar to mine.
I have a requirement to develop an application in Excel VBA to talk to an MSSQL database.The client wants a login facility for a number of named users - I am going to setup these users in the aspnet tables in my database (aspnet_users, aspnet_membership etc).There is no facility in VBA to do automatic verification of a users credentials like there is in ASP.Net so I have developed a simple login form for the user to enter their username and password and send these to a stored procedure in the database. I am looking for a stored procedure that implements the ASP.Net hashing routine to convert the user supplied password into the same format as the database stored password so I can compare and return a true or false.
I am new to mobile app development and I dont want restrict myself to one platform. Some days ago I read an article that stressed on the fact that soon web apps running on mobile browsers may replace dedicated apps (at least for non-game apps). I want to develop a social networking web app that any phone can run via the browser. These are the things I would like expert comments on:
Resources/Guidelines for developing great UIs for rich mobile web apps (HTML5?, existing APIs/Frameworks I should know)The best ways to increase performance(a reusable native simple browser app per platform that caches, provides a uniform interface to the web apps,access to sensors, APIs, features like drag drop etc for that platform.is there already one?) How do I test the apps for various major platforms and across various devices (small/large screens, touch phones etc)Best ways to manage multiple device compatibility.. (how to best handle non-uniformity of functionality on various devices/browsers on the server side using ASP.NET)
We have developed apllication in Microsoft VS 2008 and when we opening this same application with Microsoft VS 2010. Then it's asking to convert.
So can anybody tell me what it is converting exactly. Means it's open application in Microsoft VS 2010 and running properly also. But i am understanding whats happning while converting.
I'm writing some software that I have to ensure can only be installed on one machine. The plan is to have them download the application. The first time the application is ran, the app will find this unique value on the machine, encode it, and instruct the client to send it to us to get their license number. Then, of course, the value they gave us will be used to construct a license number that will only work on that machine.
A unique value per machine would be the best, but I'd settle for a unique value per the installation of windows (XP) on their machine.
I would like to create a webpage that collects a users search criteria. Then when they click a button, send the parameters to the Windows Explorer Search utility and run it. Can this be done? If so, how? I am using asp.net to create my webpages.
I think this may be a question for the architecture forum, but it feels a bit newb to me, so here goes.
I'm trying to write a utility class to use throughout my C# ASP.NET websites. I am having trouble getting intellisense to see the methods in my class. What I'm doing is creating a static class and putting it in a namesapce and with a using directive, importing that class into the code-behind of my web form. But it's not working. I would also like to minimize the visibility of the code i.e. use the least accessible access modifier necessary for use in my util class.
Which method would you like to place in tyour common class in asp.net application? A common function which you use in almost all your asp.net project question.
I am using xsd /c book.xsd to generate the a cs file. THe default cs file will be book.cs. I am wondering what swtich I can add so that i can name the generated cs file as document.cs instead of the default one. I attached the book/xsd and book.cs file, I am wondering why it generated two partial class? Should i name the generated file to match one of the partial class like BookForm.cs?
I have this method that I'm currently putting in each page I make, I know there should be a good way to move it to a single place for ease of maintenance and simplicity. I'm just not sure how I should handle the event handler. The event handler needs to be on each page, so how would I pass in a reference to the page properly so I can reference the event handler?
I need to implement Routing or Url-Rewriting in my application. So, is there any utility like logging utility Elmah. I dont want to write much code, I need to configure and start playing.
i have designed a website in my desktop and used WAT of visual studio 2008 from Website menu and then selecting ASp.Net configuration.
Now i have copied my website to a server in my local network, server name=isaserver.
i try to access WAT utility of my website at isaserver. when i change webconfig file to correct data source, utility is working but
if i create a user using my website's create user form, then that user appears in aspnetdb database of isaserver but i am not able to see that user using WAT utility.
if i create a user using WAT utility then i am not able to login into my website hosted at isaserver using that username.
no matter how i create a user, either through my website's create user form or through WAT which is mapped to isaserver, both the users will appear in aspnetdb database of isaserver.
I would like to encrypt the connectionstrings section in my web.config file using the : ASPNET_REGIIS utility However I'm running Windows 7 pro, that is without any IIS.
Is it possible for me to do it.
The path (on my local pc) to the website containing the web.config file is like this:
C:UsersmyUserDocumentsVisual Studio 2010ProjectsmyWebsitemyWebsiteWeb.config
I am developing a network discovery utility in ASP.NET (VB.NET). The utility would crawl the complete network and find out maximum details about all the devices that
are connected to it. After some research i have found out that i can get the complete information about PCs and Servers using WMI but i am unable to find a way to get
information about other types of network devices such as Network Printers, Routers, Switches, IP Phones, Handheld devices etc. Can anyone point out in the right
i have contineous data stream and saving in database. database size is growing. as per out data retention policy we have to archieve data and only keep last 6 month data on server.
if archieve data is required in future in current/live database so how do i bring it back.
i was hoping to build the user/role configuration utility into my website. I have posted before, and from what i have read, you need to create your own user/role membership utility in your website.but, i noticed in the
Microsoft.net directory C:WINDOWSMicrosoft.NETFrameworkv2.0.50727ASP.NETWebAdminFiles, that this is the entire interface for managing roles and users for a web site as long as you use standard asp.net security.is it possible to copy this site into my site to have a ready-to-go interface for user management without a user needing to have visual studio? It seems like it should be possible with minimal code changes, but I might be wrong. Im just looking for a shortcut.
I am using Dot net 2.0 and i have to create some utility in dot net .In this case i have a server which manage multiple websites.now i have to find out the status of all websites pages.like End task of window . these utility should show the memory uasages of each page hit so that we can find out right load of the sites on server.