Having an issue with Authenticaion for MVC3 Web Application - asp.net-mvc-3

I have an MVC application that displays just find in our QA environment, but not in our release environment (2 separate machines, but both machines have the same version of Windows, IIS, and of course, the application code)
It seems that in release, it cannot access the JavaSripts in a js folder. What makes it a really odd problem is that if I simply change the "Physical Path Credentials" property in the Advanced Settings to a user, instead of just leaving it as Application user (pass-through authentication), then everything works ok, EVEN if the Specific User that I put is the actual same user as the Application Pool user! However, when I do that, then the razor code
#System.Web.HttpContext.Current.Request.LogonUserIdentity.Name
returns the service account, instead of the actual user browsing the site.
In both environments, everything is the same!
The operating system is:
Windows Server 2008 R2 Standard
Version 6.1 (Build 7601: Service Pack 1)
The IIS Version is: 7.5.7600.16385)
The Application Pool uses version .net 4.0, integrated pipeline
For the web app, the only authentication enabled is Windows Authentication.
Can some one help?

Related

Can I deploy ASP.NET Core MVC program by file copy with USB to multiple Windows 10 PC, like Winforms does?

I do not know if an ASP.NET Core MVC program can be deployed like a Winforms program, just copy program files.
I am trying to code an ASP.NET Core MVC program. Whenever user type localhost in their PC browser and IIS Web program will show company related documents. Because there are a lot of PCs need to be deployed. So I wonder if I can deploy ASP.NET Core MVC program like Winforms by copying program files.
First let me tell you it's ok. Also marc_s' comment is very correct.
I guess I understand your needs. You should install this web application for every user, even if you are not connected to the Internet, you can also access it through localhost.
But what we need to understand is that the asp.net core application should be deployed on the server, so that each user can access the web service by accessing the server ip address or domain name. This is normal operation.
You should check the setting about the single-file deployment. Then we can get .exe file. Then you can add this .exe file to startup items.
Reasons for not recommending:
Each of your PCs needs to install the .net core sdk or runtime. This is very unfriendly.
If the application needs to access the database, the application cannot run without the network.

Installing process of DotNetNuke (Dnn.Platform-8.0.2)

Downloaded source package of DotnetNuke and I am new in dotnetNuke. Can anyone help me to clarify the process of installing DotnetNuke.
I am following this Install DNN
I've got a tutorial on installing DNN8 found here.
You can also follow this text tutorial
Setting up your development environment can vary based on what your
end goal is. If you are doing module development for your own use, and
within your own DNN environments, you can ignore a few of the settings
below. If you are doing module development with the idea that you
might turn around and give the modules away, or sell them, then you
will likely want to follow the guidelines set forth below to support
the widest array of DNN installation environments.
I recommend that each developer have their own local development
environment, with a local IIS website running DotNetNuke, and a SQL
Server 2008/2012 (not express, though you can use it) database for the
website. Having an individual development environment makes group
module development far easier than if you share
environments/databases.
Choosing a DotNetNuke Version Choosing a version of DotNetNuke is
important when you start your development for couple of reasons. For
modules that you are developing for yourself, you need to ask, what is
the minimum version of DotNetNuke that you have in production. Are you
running DNN 5.6.1? Are you running 6.2.6, 7.0.0, 7.0.6? Based on the
answer you can determine what version of DNN you should setup as your
development environment. You shouldn't be developing on a newer
version of DNN than what you have running in production. As with
everything there are ways around this, but I am not going to go into
the details on that in this tutorial.
As a developer working to create modules and release those, you might
have production sites that are running on the latest and greatest
version of DNN, but what about your customers? Or your potential
customers? You have to ask yourself, do you want to provide support
for really old versions of DotNetNuke? From a development perspective
you will probably say no, but from a business perspective, you might
say yes, and here’s why. Not everyone upgrades DotNetNuke websites as
they should, and often times you will find that some people never
upgrade. While I don’t advise taking that approach to managing a
DotNetNuke website, it is a fact of life that people don’t always
upgrade and there are thousands of people, if not tens of thousands,
that have sites that aren’t running on the latest version of DNN. You
should take that into account when you are doing your module
development, if you compile your module against an older version of
DNN then your module should run on newer versions of as well, for
example. If you compile your module against DotNetNuke 6.2.6 it will
likely run on every version of DNN released since then. Though there
are extended cases where this won’t always work, DNN strives to
maintain backwards compatibility, this isn't always possible.
You might also want to use features that are only available starting
with a specific version of DotNetNuke, such as the workflow
functionality found starting in DNN 5.1, in that case you may choose
not to support older versions of the platform out of necessity. This
will minimize the market in which you can sell your modules, but also
can make for less support and an easier development cycle due to the
features that DNN provides.
Choosing a Package Now here’s one that may baffle you a bit. I’m going
to recommend that you use the INSTALL package for whatever version of
DotNetNuke that you download. What? The INSTALL package? What about
the SOURCE package? Well you can use the source, but you don’t need
it. The module development that I’m setting you up for doesn't require
the DNN source, and using the INSTALL package makes your development
environment cleaner. We aren't going to be opening the DotNetNuke
project when we do our module development, so why have the files
sitting around for nothing? Also, if you've ever tried to use the
SOURCE package for anything, you'll know it isn't easy.
The steps for setting up your development environment will apply to
both the Community and Professional editions of DotNetNuke.
Installation Configuration Once you have the version selection out of
the way you can go through the installation process. While I’m not
going to walk you through the minutest of details of each step of
installing DotNetNuke in this post, I will at least try to point you
in the right direction for each step.
Download the INSTALL package of the version of DotNetNuke you want to
use in your development environment.
Extract the files in the INSTALL package to a location of your
choosing, this location is where you will point IIS (the web server)
when we can configure the website. In my environment I typically use
c:\websites\dnndev.me\ (One item of note: you may need to right click
on the ZIP file and choose Properties before extracting, on the
properties window if you have an UNBLOCK option, click that. Some
versions of Windows have started blocking files within the DotNetNuke
ZIP files, which will cause you problems later during the actual
install.)
Setup IIS IIS is the web server that comes with Windows computers. DNN
7 requires IIS 7 or later (7,7.5,8.0), so you will need at least
Windows Vista, Windows 7, Windows 8, or Windows Server 2008 R2,
Windows Server 2012.
In IIS you should create a new website (Note: If you use an existing
website in IIS be sure to add the HOST binding for DNNDEV.ME), and
point to the folder where you extracted the INSTALL package.
Note: With DotNetNuke 7.0+, .NET Framework 4.0 is required, so be sure
that your application pool is configured to run under 4.0, and not
2.0.
Set File Permissions Setting up the file permissions for your DNN
install is often the step that causes the most trouble. You should
right click on the FOLDER in which you extracted DNN
(c:\websites\dnndev.me) and choose properties. Choose the Security
tab. You need to add permissions for the account in which your
website's application pool is running under. You will want to setup
the permissions to give the account Full or Modify permissions for the
DNNDEV.ME folder. Which account you will use will vary based on your
version of IIS, here’s a simple list of some of the default accounts
based on the version of IIS.
IIS Version Operating System Account IIS 7 Windows Vista, Windows
Server 2008 localmachine\Network Service IIS 7.5 Windows 2008 R2,
Windows 7 IIS AppPool\APPPOOLNAME IIS 8 Windows 2012, Windows 8 IIS
AppPool\APPPOOLNAME
Note: If you are using IIS7.5/8.0 you’ll notice in the above table
that we have APPPOOLNAME in the identity, this is because when you
setup a new website in IIS a new application pool is created. In place
of you should type in the name of the application pool that was
created. You can also bypass this and configure your application pool
to use the Network Service account instead of a dynamic account if you
would like.
Database Configuration In SQL Server you should go through and create
a new database. I always create a database with the same name as the
website, so in this case DNNDEV.ME. Once you have created the
database, create a user that can access that database. I always use
SQL authentication, turn off the enforce password requirements, and
give the user DB Owner and Public access to the DNNDEV.ME database.
Remember the username and password you create here as you will need
them when you walk through the Installation screen for DotNetNuke.
DotNetNuke Installation Screen Populate the installation screen with
the standard DNN information, Host username, password, etc. For the
Database option, choose Custom and configure your database connection,
providing the Server IP/Name, the Database name (dnndev.me). For the
database authentication you'll want to choose the option that allows
you to enter the username/password for the database user that you
created previously.
Now there are two additional options you can configure, normally I
would tell you not to modify these, but from a development environment
perspective I do recommend that you change the objectQualifier
setting. It should be blank by default, you should type in “dnn”
(without quotes), this will prepend “dnn_” to all of the objects that
get created by DNN such as Tables and Stored Procedures. This is not
something I recommend from a production stand point, but if you are
developing modules for sale, then supporting objectQualifier in your
development is recommended. It will save you time down the road if you
have a customer who has an objectQualifier defined on their production
databases.
Follow the following video and it has total two parts one and two part links are givenbelow
Part one
Part two

How to run Websphere Portal/portlets locally from within RAD to debug

I have been looking around on the internet how to setup a local Portal environment together with the RAD IDE, I found threads like this but that's a thread of the ancient history (speaking in IT terms) or only refers to optimizing Portal with RAD (here). Currently I have RAD 8.0.4.1 running and I can run a WAS-instance, but I can't manage to get the Portal-environment run locally. I read that in the past there was some sort of specific Portal Test Environment, but with the newer RAD do I have to install a full Portal? And where to get it? I cannot find a good reference anywhere.
I want to debug my portlets locally in as local Portal-context. Currently the portlets are deployed on a remote Portal-server. This costs time (package WAR, upload, refresh nodes et cetera). So I want to run our Portal locally including its portlets.
In RAD I can define new servers and can see the option "WebSphere Portal v6.1 Server on WAS 7", but it requires me to define a Server runtime environment. This opens a new popup where I have to specify:
WebSphere Portal Location
WebSphere Application Server Location
I have my runtimes installed in "IBM\SDP\runtimes" which contains the following folders "base_stub, base_v6_stub, base_v7, base_v7_stub, base_v8_stub, base_v61_stub, portal_v61_stub, updi_v7x, updi_v70, wsdk". Whatever location I try to point to, it keeps giving an error message: "The Portal Server installation is not correct".
I have the following questions:
what do I need to run/debug my portal with its portlets locally?
the fact I see portal_v61_stub in my runtime directory, means a Portal server is not installed? My IBM installation manager doesn't specifically show an option to install a Portal Server.
is it possible to run portlet/portal locally and use hotswapping to immediately see the changes in the code/view?
where can I download/install the required software?
I heard that you need a very heavy machine to do portal/debug stuff locally (I am running on a 8 GB/Intel E8400 at 3.00 GHz.)
how can I transfer the current Portal-setup which is running on a remote server to my local system (mirroring/just copy files?)
Few things,
RAD is a tool to develop application developed on Eclipse. It doesn't come with any server application. You need to install your WAS/Portal Server.
RAD supports Portal development and hence it has got stubs but you wont be able to deploy an application without a server.
what do I need to run/debug my portal with its portlets locally?
You need an Application server installed on your machine. Or Connect to a remote server.
the fact I see portal_v61_stub in my runtime directory, means a Portal server is not installed? My IBM installation manager doesn't specifically show an option to install a Portal Server.
No. Server is not installed. You dont need IBM Installation Manager for installing server. It's for RAD.
is it possible to run portlet/portal locally and use hotswapping to immediately see the changes in the code/view?
Yes it is, if you have a server installed.
where can I download/install the required software?
You can download the express version of server. But if otherwise if you are IBM business partner you can download from their website.
I heard that you need a very heavy machine to do portal/debug stuff locally (I am running on a 8 GB/Intel E8400 at 3.00 GHz.)
3 GB is fine for running RAD and IBM Websphere Portal Server. ( I am running it right now with many other applications ) But for best result use 4 GB RAM.
how can I transfer the current Portal-setup which is running on a remote server to my local system (mirroring/just copy files?)
You need to open your RAD and attach a server to it. Go to windows->preferences->servers->Webpshere

ASP.NET MVC Web Application with SQL Azure (To Do List Tutorial) -- error when deploying to production

I'm working on the following tutorial in the Windows Azure website:
https://www.windowsazure.com/en-us/develop/net/tutorials/web-app-with-sql-azure/
(also: go to windowsazure.com, click on the "Develop" heading, click on ".Net" under languages, under "Create Your First Application" -- click on ASP.NET MVC Web Application with SQL Azure)
I can run the application in the Windows Azure emulation environment on my development machine. If I change the connection strings to the production database, the app works in the local development environment.
However, when I deploy the application to Azure, I get an error message: "Sorry, an error occurred while processing your request." This appears within a rendered page, so I think the request is getting to ASP.NET.
I believe the problem I'm having is with allowing the production app on Azure to connect to the SQL Azure database.
I believe it is a firewall issue, but haven't been able to determine what the IP range needs to be. (I previously thought the problem would be with me running VS 2010 in a 32 bit environment, with Windows Azure as a 64 bit environment, but we deployed the sample app from a 64 bit environment and had the same issue). For additional details, here's my previous posting on MSDN to a previous inquiry on the same issue: http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/23afb5e3-e2ee-4444-aabb-7001ae6c6e6a/#af5284c0-ef4b-4193-b912-d4b7adfb5d21
Thanks for any assistance you can provide. I really want this sample app to work!
Update: Got the tutorial to work on a different computer and fresh 64 bit configuration, pointing to a different data center.
I got my hands on a new laptop with 64bit Windows 7 Home Premium , and installed Visual Web Developer 2010 Express, all of the most recent Azure and MVC SDKs. Seems like what I thought was a firewall issue, could have possibly been issues with database connectivity at the North Central data center. (I'm speculating, and will still need to test my original configuration against the South Central data center to see if this is actually the case. But, the North Central data center was not an available choice for hosting a SQL Azure database (3 month subscription), and here's a link to a discussion of this on another thread:
http://social.msdn.microsoft.com/Forums/da-DK/ssdsgetstarted/thread/7b181eef-ccd1-4090-80d1-0853059d166f
As mentioned above, the checkbox "Allow other Windows Azure services to access this server" needs to be checked, and both the service and the database need to be located in the same Windows Azure data center.
As #veblock suggest, you may try switching off the custom errors to see the actual error.
Meanwhile, the "IP range" that you seek for enabling firewall rule for your role is just a checkbox away:
You just need to check that "Allow other Windows Azure services to access this server" checkbox. The entry "Microsoft Services" with IP range of "0.0.0.0 - 0.0.0.0" will be automatically added. This is an internal entry and Microsoft keeps track of their own IP ranges, so that any Windows Azure data center will be able to access this SQL Azure Server.
But, yes, you can also check the real error message, by either Remote Desktopping to the instance, or by disabling the custom errors. There is a small chance that the ASP.NET MVC is also not fully installed in the Azure Instance. The easiest way to eliminate this problem would be by right clicking on the web application project and select "Add deployable dependencies", then chose ASP.NET MVC.
Thank you for your help. I have also hit this issues and spent several hours to debug what was going on since everything worked as expected in the Emulator, but won't work in production. After I have moved my hosted service and the database server to be in the same region, the problem went away.
In the original sample, it was also noted that it was important to ensure both are in the same region, but it mentioned due to performance reasons only, but for me it won't work at all.
"
IMPORTANT: Pick the same region that you choose earlier when deploying your application. This will give you the best performance.
"

ServerObject aspImage in Win 2008 64-bit

Does anybody have any experience/ knowledge in installing the aspImage.dll on a 64-bit Windows 2008 platform?
I have a Classic ASP site that uses this component and would badly need to get the dll running. I have tried checking support documents for these to no avail.
Would really do appreciate your response.
Thank you!
Exactly the same problem migrating from server 2003 iis6 to server 2008 iis7 64 bit. Creating a new com+ application solved the problem.
I created the application I named aspimage using the com+ wizard as a server app, used local service for permissions, left default creator owner role alone, added users everyone and authenticated. After the folders were created, I added a component using the wizard. Already registered component, (assumes regsvr32 %systemroot%\syswow64\aspimage.dll ) and selected the check boxes 32 bit registry and details to ensure selection of the correct dll. Finish and the process worked. I hope this helps someone.
In general if you want to use a 32-bit COM object on a 64-bit machine you'll want to register the COM object use the regsvr32 executable located in the Windows\SysWOW64 folder. In IIS you'll want to go to the application pool advanced settings and select true for the Enable 32-bit Applications setting.
I know this is old, but I had similar problems this week:
To answer the question about registering, yes, you still have to run their registration tool and enter your license key. If using UAC, remember that both the regsvr32 and the aspimage's registration app must be run "as administrator".
I have managed to have the ServerObject aspImage.dll component run in a Windows 2008 64-bit platform server by creating a COM+ Application and using the aspImage.dll as a COM+ component.
I've also learned that any 32-bit components used in IIS that will be run in a 64-bt server needs to go through this process too.
For more details on delving on COM+ components and apps, please refer to this link: http://technet.microsoft.com/en-us/library/cc725986.aspx
Hope this helps!

Resources