Seeing the source code instead of a website - c#

I'm kind of new in ASP.NET and C# so it may sound a stupid question.
I installed MAMP in order to have a testing server.
My project is in the htdocs directory.
I'm working with mac and as I said I'm trying to learn C# and ASP.NET.
When I try to preview my website in dreamweaver, I see the source code instead of the website (when not in "live view" I see the example button I put in the code).
When I use mono-develop, the same project works good on the browser. I think the problem is with MAMP or apache but I'm not sure...

MAMP is specifically for Apache, MySQL and PHP installations. ASP and C# are Microsoft languages and the MAMP server will not recognize them. You need Windows to have a c# server. I tried to do what you are doing: get Windows 7, it is easier.
Luckily:
You can run Windows on your Mac
Microsoft gives out free developer tools including Visual Studio which will help you get started.
Alternatively you can get a .NET web host for less than $7 per month and try all of your creations out on their server. It would still be a challenge for a beginner to code on a Mac and pull it off though.

Related

Using Visual Studio 2015 Community to develop secure Android and iOS apps without 3rd party license like Xamarin

I'm trying to get into Android and iOS app development using Visual Studio 2015 Community, but I'm having some trouble figuring out a way to do it securely with the tools provided in Visual 2015 Community.
And just to clarify, I'm not asking if I can develop native Android or iOS apps in Visual Studio.
The apparent c# Android and iOS support in VS 2015 is a bit misleading because it requires a Xamarin license, now I know that VS 2015 Community has Android and iOS support via Cordova using HTML5, CSS3 and JavaScript so I'm leaning towards using that as it appears to be my only option. I'm quite familiar with c# and SQL but have limited experience with HTML and JavaScript and nothing else beyond that, and I also understand the security concerns with JavaScript, so now I'm not really sure where to go from here.
The project I'm planning to work on is a personal project that only I will use, it's a personal password manager app that I want available on Android, iOS, Windows and also a Web App. The Android, iOS and Windows Apps will all connect and sync their data from an SQL server, so they will need to securely transmit the data and securely cache it locally. I'm not concerned about the Windows App and I'm planning to use ASP.NET for the web app, but I don't even know how to start with Android or iOS if the only tools available to me are HTML5 and JavaScript.
I've checked out a lot of forms on here regarding "Securely connecting to a SQL server with JavaScript" and the replies are always "Don't do that!!!" followed with "Use a server side process like PHP", it's the latter that I'm interested in, but I don't know where to look for tutorials or references in context of using Visual Studio as my development platform.
So my question is, is there actually any way to create an HTML/JS app with the tools provided in VS 2015 Community to securely send, receive and store sensitive data? Is it possible to lets say use a c# class to securely handle the SQL communications and local caching and just call the c# methods from JS and do this securely? Or is using a server side process like PHP my only option? If so, then my Apps would not be able to securely cache data locally, would they.
Your app on mobile device can be safely developed with JavaScript and HTML if you don't want to buy a Xamarin license.
When they say you should not use JavaScript to connect to database, they simply mean your mobile app should not talk to the database directly. Instead, you should build a web service using PHP or ASP.NET Web API or node.js (which uses JavaScript if it surprises you) to act as a proxy between the mobile and the database. This web service can help you achieve better security control if you do follow the best practices.

Can I upload video file more than 4GB in visual studio 2005 using c# web service

How can i upload video files of large size more than 4GB in web server using web service written in c# under visual studio 2005, without going for the silverlight concepts and framework 4.0. I need to make available this service within 2008, because my server is configured to 2008. I cant use silverlight which is present in visual studio 2012.
Any suggestions for implementing this concept is welcomed.
Check out this post for the current IIS size limit and this post for additional timeout settings and this article for some suggestions on how to do what you want with a custom client app, I don't think it would work directly from the browser. Here is a summary of the IIS limits and the most popular browsers.
Based on the above I think the safest thing you can do is impose a limit to the end user; something like 500 megs per file sounds reasonable.
On a similar note, apparently Apache has removed this kind of limitations in 2005 ...

An alternative to iis/asp.net/asp while still being able to code in C#

Is there any alternative to IIS/ASP.Net/ASP while still being able to code in C# (for web back end development) ? Is there any light weight open source alternative to IIS,ASP.Net combo ?
Mono is the open source alternative Mono project
Have you tried the new IIS Express? It provides you with a configurable IIS 7.5 style platform per website solution. It's really useful when developing on XP for instance where previously you would have been limited to 1 website per development machine.
It's now available as part of the Visual Studio 2010 SP 1 download.
Check it out here;
IIS Express Overview
Although I'm a bit unclear as to your actual project requirements there is nothing stopping you from creating a C# based application and then exposing a web service which your application could connect to written in any web based language of your choice. However you will still have to host the web service in IIS.
You can use Cassini:
http://ultidev.com/products/Cassini/index.htm
Cassini is very reliable but not designed for heavy usage which is why UltiDev have built UWS Ultidev Web Server Pro based on the original Cassini Server:
http://ultidev.com/products/UWS/

Web-Update class in WinForms application

I have build an C# Winforms application which will need regular updates and patches in the future. To ease the update process for the users of my app I'd like to build an web-update class that looks for an update on my site.
What would be the most secure and reliable way to implement such a class, considering:
The site is build in PHP / Joomla
I haven't the foggiest idea how to program in PHP
All webserver directories are read-only by default (and only writeable by an FTP account I own)
The first and so far only idea that comes up to me is to create a file on my webserver that'll never be renamed, and in it I'll define the location of the latest version and number of it. The app will then be able to download the update from that path using the WebClient class.
However, if there's anyone with a better update-class idea that doesn't require an asp.net webserver nor webservices (already tried and failed on that one), I'll be grateful.
Edit:
I've tried the ClickOnce solution suggested by Gabriel McAdams, but on application startup I experience a "ClickOnce launch utility has stopped working" crash. So I'm again looking for a solution to update an application. For the moment, the answer of Kristian Damian is the most suitable.
I would look into ClickOnce Deployment.
Here is some of the text from that page:
ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce.
Maybe this link can help you:
http://themech.net/2008/05/adding-check-for-update-option-in-csharp/
I developed a Windows application in C# that does updates automatically over the Internet. After much grief, mainly because at that time I had very little experinece with Web development, I purchased a product that made it easy to update the application. If it is OK with StackOverFlow and you are interested, I can give you the URL.

Development environment for ASP.NET with EpiServer

At our company we are going to develop more for the Windows platform than we have done up until now. As this scale of Windows development is new to us it would be nice with some feedback from experienced developers.
Requirements we have:
5 developers from the beginning.
15 developers a year from now.
All developers should be able to develop at the same time.
Be able to develop solution for ASP.NET and EpiServer 5.
Our idea:
A shared server which developers use for development through Terminal Services.
SQL Server Express.
Start with some free express edition of Visual Studio, upgrade to a commercial version if we need the additional features.
Use IIS and not the web server built into Visual Studio.
Questions:
Are we on the right track?
In terms of license costs the above should be cheapest, right?
What do you think about multiple developers doing development using a shared TS-server?
Do you know of any company which has a similar development environment?
Are we going to miss some features of the full Visual Studio version immediately? Is using Express version a bad choice?
Is IIS the best choice? If use IIS the developers may use the same port for deployment. If we use the built in web server each one has to set their own port as we're sharing a machine.
Comment answer:
We are thinking about a shared server as it will most likely decrease the license costs. So it's purely a cost issue. We are using CVS for version control. Our situation is that we develop on Mac and Linux, that's why buying 1 server license + Visual Studio licenses seems to be a cost effective way of starting this type of development.
Since you are referring to EPiServer my recommendation is to use Visual Studio's built in web server on each developer's PC. Then get some kind of Windows Server and run SQL Server and IIS on it. Also use some kind of DNS service that allows you to create sub domain host names that you use to run multiple port 80 sites on the IIS.
I don't know the exact terms but you might be able to run SQL Developer Edition in this scenario instead of Express. Then you get the full set of management tools, no size limit on databases and support to import and export data. If you got customers with both 2005 and 2008 SQL Servers you should run both versions as two different instances so that you can move, create and restore database backups easily between environments.
Developers all connect to the same database while developing and when appropriate deploy their projects to the server's IIS web site. If you like you can allow a customer to use it as test site.
I would put the free VisualSVN Server on the server too and use that instead of CVS.
I would also look into renting this as a virtual server somewhere and use some kind of VPN to access it.
If you can live with the limitations I don't see any problems using VS Express.
Good luck!
I second Numenor's comment -- go with a free source control like Subversion. I would be scared to develop on Terminal Services for the simple reason that Visual Studio can be a resource hog if you start doing any debugging. I'm assuming you're going to have more than one person on the project at a time, and I'd think you could get desktops that would work out better for a lower price than a large server that could accommodate those types of terminal server sessions.
On top of that, if you have multiple people working on a project on the same physical box, you're going to have problems with two people changing one file...back to the source control recommendation.
Andrew Siemer has some great articles outlining how to set up a development environment. Interestingly enough, they're in his series-in-progress about setting up a StackOverflow type of site. Start with this one, then follow the series to get the scoop on automated builds.
Edit: You probably don't want to use CodePlex as Andrew outlines, but a private Subversion server would work the same way with TortoiseSVN. You can get Subversion from CollabNet.

Categories

Resources