Notice that in the Mark case, Jesus is saying, "Don't forbid them from casting out demons," whereas in Acts 19, it is the demons themselves who are unwilling to be cast out by someone who may use the name of Jesus, but who seems to be trifiling with things they shouldn't be. In the case of Mark, it would be humans resisting, in the case of Acts, it is demons.
In the case of the passage in Mark, the question was one of association. As answered in another question, the focus is as much on institution as anything else. Here, Jesus simply said something to the effect of 'Just because they aren't attending your church doesn't mean they can't do something in my name.'
In the Acts passage, we have someone attempting to cast out demons who is clearly unworthy to do so. The name of Jesus is being invoked as a talisman of sorts - a magic set of syllables that some one is trying to utter in order to gain control. When this unworthy person attempts to cast out the demon, the demons are the ones who realize the would-be exorcist as a person who may know the name of Jesus, but not really be one of his. When the demons say to the sons of Sceva, "I know Jesus" they are admitting that Jesus has power over them. When they say, "I know of Paul," it is because they have heard that Paul is one who correctly uses the power of Christ. These demons know that Jesus is working through Paul, much to their consternation. But it is one thing to say a name, and another to understand the one through whom power comes. These sons of Sceva apparently know the words, but not the Christ.
The demons are aware of this - and they pounce.
I would argue the Acts 19 passage should also be read in light of Acts 8. In Acts 8, a sorcerer named Simon sought to control demons and harness the power of the Spirit for personal gain. He even offered Peter money to learn.
18 When Simon saw that the Spirit was given at the laying on of the apostles’ hands, he offered them money 19 and said, “Give me also this ability so that everyone on whom I lay my hands may receive the Holy Spirit.”
Peter reacts harshly saying this power of Christ is not something that can simply be bought or sold. He says:
20 ... “May your money perish with you, because you thought you could buy the gift of God with money! 21 You have no part or share in this ministry, because your heart is not right before God. 22 Repent of this wickedness and pray to the Lord in the hope that he may forgive you for having such a thought in your heart.
When fighting the demons, Paul says in Ephesians 6 that
10 Finally, be strong in the Lord and in his mighty power. 11 Put on the full armor of God, so that you can take your stand against the devil’s schemes.
Notice how the fighter is to be strong in the Lord and in his mighty power. Notice that we taken on armor - a defense, not an offense.
12 For our struggle is not against flesh and blood, but against the rulers, against the authorities, against the powers of this dark world and against the spiritual forces of evil in the heavenly realms. 13 Therefore put on the full armor of God, so that when the day of evil comes, you may be able to stand your ground, and after you have done everything, to stand.
14 Stand firm then, with the belt of truth buckled around your waist, with the breastplate of righteousness in place, 15 and with your feet fitted with the readiness that comes from the gospel of peace. 16 In addition to all this, take up the shield of faith, with which you can extinguish all the flaming arrows of the evil one.
Finally note, the only offensive weapon we have is the Word of God, nothing of our own:
17 Take the helmet of salvation and the sword of the Spirit, which is the word of God.
In other words, Simon, this Jesus' power isn't a game. There are real forces at work that aren't of your control. There is, however, a Jesus who is in control, at whose name demons cringe. You are not in control - He is. Sons of Sceva, let him fight, for as it says in 2 Chronicles 16:9
9 For the eyes of the Lord range throughout the earth to strengthen those whose hearts are fully committed to him. You have done a foolish thing, and from now on you will be at war. ”
In other words, if you are going to fight demons, make sure you realize how the demons are actually defeated.